ASP循环,谁能帮我解决?怎么找不到答案阿!

来源:百度知道 编辑:UC知道 时间:2024/05/17 04:28:01
我现在要循环,不管用for 或 do /while都无所谓,只要能解决问题

以FOR为例
for i=1 to 10000
response.write i
next
运行一万次是不是很占资源,我想有个步子,
第隔100暂停一下,以节约资源
for i=1 to 10000
if i mod 100 = 0 then
response.write "又一百了,暂停一下"
end if
next
如此,以一直循环到next,而在其间不跳出循环体,也不是step
谢谢

间歇几秒后再进行下次是可以的,但是不会节约系统资源:
<%
s = timer
for i = 1 to 10000
do
loop until timer-s >5
response.write i
next
%>

呵呵,你这种做法真是.......