希腊神谱百度云:关于在ASP中输出怎样换行?

来源:百度文库 编辑:高校问答 时间:2024/04/29 12:05:54
我在ASP中这样输出内容:

<%set rst=server.createobject("adodb.recordset")
rst.open "select top 40 * from admin where amount>=5 order by amount desc ",conn,1%><% i=1
do while not rst.eof%>   <a href=wj.asp?userName=<%=rst("Username")%> target=_blank><%if rst("other")<>"" then%>
<%=rst("other")%>
<%else%>
<%=rst("Username")%>的文集<%end if%> </a>
<%
i=i+1
if i=40 then exit do
rst.movenext
loop
rst.close
set rst=nothing
%>

怎么样才能使i=6时,自动输出一个换行?
也就是输出6条记录后,自动换行。

<%set rst=server.createobject(\"adodb.recordset\")
rst.open \"select top 40 * from admin where amount>=5 order by amount desc \",conn,1%><% i=1
do while not rst.eof%> <a href=wj.asp?userName=<%=rst(\"Username\")%> target=_blank><%if rst(\"other\")<>\"\" then%>
<%=rst(\"other\")%>
<%else%>
<%=rst(\"Username\")%>的文集<%end if%> </a>
<%
i=i+1
if i=40 then exit do
if i=6%> <br>\'here
<%
rst.movenext
loop
rst.close
set rst=nothing
%>

<%set rst=server.createobject("adodb.recordset")
rst.open "select top 40 * from admin where amount>=5 order by amount desc ",conn,1%><% i=1
do while not rst.eof%> <a href=wj.asp?userName=<%=rst("Username")%> target=_blank><%if rst("other")<>"" then%>
<%=rst("other")%>
<%else%>
<%=rst("Username")%>的文集<%end if%> </a>
<%
i=i+1
if i=6 then response.write "<br>"
if i=40 then exit do
rst.movenext
loop
rst.close
set rst=nothing
%>