ASP循环语句问题

来源:百度知道 编辑:UC知道 时间:2024/05/03 01:50:11
<a href="Html/<%=Rs("ID")%>.html" target="_blank"><img src="<%=Rs("Pic")%>" width=140 height=140 border=1 alt="电影-<%=Left(Rs("Title"),9)%>"></a><br>
<a href="Html/<%=Rs("ID")%>.html" target="_blank" title="<%=Left(Rs("Title"),9)%>"><%=Left(Rs("Title"),9)%></a>

这段代码怎么写先循环2列后再循环5行

<%
sql = "SELECT top 10 * FROM YourTable"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,1,1

Response.Write"<table width='100%' border='0' cellspacing='0' cellpadding='5'>"
top=1

do while not rs.eof
Response.Write"<tr align='center'>"
Response.Write"<td width='50%'>"
if not rs.eof then
%>
<%
'在此处显示记录
Response.Write"</td>"
top=top+1
rs.movenext
end if

Response.Write"<td width='50%'>"
if not rs.eof then
%>
<%
'在此处显示记录
Response.Write"</td>"
top=top+1
rs.movenext
end if

Response.Write"</tr>"
if top>10 then exit do
loop
Response.Write"</table>"
%>
不明白加QQ345338899