asp一行只显示3个产品怎么写呀?

来源:百度知道 编辑:UC知道 时间:2024/06/30 19:00:19
<table>
<tr>
<td> <%
if not rs.eof then
i=0
do while not rs.eof
%>

<table border="0" cellspacing="0" cellpadding="0">

<tr>
<td width="155" height="191" valign="top" background="images/baihuotu.jpg">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="150" height="189" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height=

response.write("<table>")
for i= 1 to maxrow
if rs.eof then exit for
response.write("<TR>")
for j= 1 to 3
response.write("<TD>"&ProductInfo&"</TD>")
rs.movenext
if rs.eof then exit for
next
response.write("</tr>")
next
response.write("</table>")

循环嵌套:
内循环控列,外循控制行;