response.write"<tr>"
for i=1 to 10
if rs.eof then exit for
jingName=Left(rs("jingName"),10)
response.write "<td width='20%' align=center style='line-height:25px;'><a href='jing_show_"&rs("ID")&".html' title='"&jingName&"'><img src='"&rs("BigPic")&"' border='0'width='110' height='80' alt='"&jingName&"'></a><br>"
Response.write "<a href='jing_show_"&rs("ID")&".html' title='"&jingName&"'>"&jingName&"</a></td>"
if i mod 5 = 0 then
Response.write"</tr>"
end if
rs.movenext
next
是这样的,这段代码在我的程序里是能够正常运行的,而且显示也能显示2行,我就是不明白为什么第二个<tr>会出来,因为是table布局,前台查看源代码,通过这端程序还能有Tbody这个标签产生。。。。。。
还有1楼的 你的应该不行,想想看第一次运行到5 生成1行 再多了个<tr>那 到10呢? 结尾岂不多了个</tr>? 我是这么改的在5 和 10处 都加代码 5处加<tr> 10处就只有</tr>
就是想不通这个for循环怎么会产生第二行的<tr>?? 继续求解