搞定。。。链接也写出来了。。。
好高兴哈!!!三行四列 图片和图片名都带链接的代码,经过两天终于写出来了。。。
<%
i=0 ‘i为数据集中的记录数 这里是三行四列 (3*4)所以 i=12,数字3表示分成3行, 数字4表示为分成4列
response.write " <table width='770' height='460' align='center'> "
do while not rs.eof
if i mod 4 =0 then response.write " <tr> "
%>
<%
response.Write"<td align='center'>"
response.Write"<a href='metro_end.asp?id=" & rs("shangjia_id")& "' target='_blank'>"
response.Write"<img height='100' width='135' src='/photo/"& rs("shangjia_tupian") &"'/>"
response.Write"<br>"
response.Write""& rs("shangjia_name") &""
response.Write"</a>"
response.Write"</td>"
%>
<%
i=i+1
if i mod 4 =0 then response.write " </tr> "
rs.movenext
loop
if i mod 4 <> 0 then response.write " </tr> "
response.write " </table> "
%>
[[it] 本帖最后由 awke002 于 2008-8-25 10:51 编辑 [/it]]