关于ASP中do while限制循环的问题

2025-05-17 13:12:39
推荐回答(5个)
回答(1):

<%
i=0
do while not rs.eof
%>






 class="gc"><%=rs("title")%>


<%
i=i+1
if i=8 then exit do
rs.movenext
loop
%>

覆盖,上面的i=8 可以自定义,比如输入10等。

ps:提供程序定做,网站开发服务,有需要的朋友可百度HI我。

回答(2):

<%
dim i=0
do while not rs.eof and i<=100//这个可以自己填,100就是打印出100条
i=i+1
%>






 class="gc"><%=rs("title")%>


<%
rs.movenext
loop
%>

回答(3):

for i=1 to 2
if rs.eof then exit for

rs.movenext
next

用for

回答(4):

加一个分页显示吧,多了的就分页

回答(5):

你是说分页吗
用下以下属性
rs.pagesize
rs.absloutepage