标题:页面延迟的两个简单方法
只看楼主
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
结帖率:0
 问题点数:0 回复次数:1 
页面延迟的两个简单方法
一、

<% Response.Buffer = True %> <% ' Setup the variables necessary to accomplish the task Dim TimerStart, TimerEnd, TimerNow, TimerWait ' How many seconds do you want them to wait... TimerWait = 5 ' Setup and start the timers TimerNow = Timer TimerStart = TimerNow TimerEnd = TimerStart + TimerWait ' Keep it in a loop for the desired length of time Do While (TimerNow < TimerEnd) ' Determine the current and elapsed time TimerNow = Timer If (TimerNow < TimerStart) Then TimerNow = TimerNow + 86400 End If Loop ' Okay times up, lets git em outa here Response.Redirect "nextpage.html" %>

二、

<% Sub TimeDelaySeconds(DelaySeconds) SecCount = 0 Sec2 = 0 While SecCount < DelaySeconds + 1 Sec1 = Second(Time()) If Sec1 <> Sec2 Then Sec2 = Second(Time()) SecCount = SecCount + 1 End If Wend End Sub %>

' To change delay adjust here <% TimeDelaySeconds(2) %>

搜索更多相关主题的帖子: 页面 延迟 
2004-06-08 22:19
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
得分:0 

哎,ASP里没有DoEvents方法,你的延时都是死循环来实现的,消耗CPU资源吧


天津网站建设 http://www./
2004-06-09 08:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-2210-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.247105 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved