来个高手!for循环问题!
我想做的是,每一行出三个产品之类的,但是我只能出来两个,高手帮帮忙啊!
<!--#include file="conn.asp" -->
<% set rs= Server.CreateObject("adodb.recordset")
sql="select top 60 * from song order by click desc"
rs.open sql,conn,1,3
response.write rs.recordcount
%>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META><LINK href="images/css.css"
type=text/css rel=stylesheet>
<BODY leftMargin=0 topMargin=0 >
<TABLE width="100%" border=0 cellPadding=1 cellSpacing=1 bgcolor="#e7dfc6">
<TR height=23>
<%if not rs.eof then
for i=1 to rs.recordcount
if rs.eof then
exit for
end if
if i>3 and (i-1) mod 3=0 then
response.write"<tr> "%>
<TD width="33%" bgColor=#f7f7ef><div align="center"><%=rs("name")%>(<A href="http://www.nowok.com/Singer703.htm"><%=rs("player")%>)</A></div></TD>
<%else%>
<TD width="33%" bgColor=#f7f7ef><div align="center"><%=rs("name")%><A href="http://www.nowok.com/Singer703.htm">(<%=rs("player")%>)</A></div></TD>
<TD width="34%" bgColor=#f7f7ef><div align="center"><%=rs("name")%>(<A href="http://www.nowok.com/Singer703.htm"><%=rs("player")%>)
</A></div></TD>
<%end if%>
<%rs.movenext
next%>
<%end if %>
</TR>
</TABLE>
</BODY></HTML>