浏览模式: 普通 | 列表
1月, 2013 | 1

asp跳出循环的实现方式

[ 2013-01-07 15:46:05 | 作者: admin ]
         i = 0
         Do While (i < 5)
                For j = 1 To 1
                     If (i = 3) Then Exit For

                     'MsgBox "I'm not 3, I'm " & i
                     'Do something else...
                    
                Next j
                i = i + 1
         Loop

让asp立即输出缓存 Response.flush

[ 2013-01-07 15:26:53 | 作者: admin ]
让asp立即输出缓存(Response.flush),实时显示数据

如果有网页比较慢,可以立即输出缓存,让浏览者看到当前执行的状态

for i=0 to 1000
        response.write i&"test"
        response.flush
next
1