首页 / ASP / asp 延时 页面延迟的三种方法
asp 延时 页面延迟的三种方法
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了asp 延时 页面延迟的三种方法,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1161字,纯文字阅读大概需要2分钟。
内容图文
![asp 延时 页面延迟的三种方法](/upload/InfoBanner/zyjiaocheng/385/09ffc6bb348c466caabe6ca4d5301e15.jpg)
asp延时第一种
代码如下:
<% 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" %>
asp延时二、
代码如下:
<%
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) %>
asp延时第三种方法
代码如下:
'asp延时方法
Sub DelayTime(secondNumber)
dim startTime
startTime=NOW()
do while datediff("s",startTime,NOW())<secondNumber
loop
End Sub
call DelayTime(5)
测试用可以,但是这样的代码很占CPU,不推荐访问量大的站使用……
内容总结
以上是互联网集市为您收集整理的asp 延时 页面延迟的三种方法全部内容,希望文章能够帮你解决asp 延时 页面延迟的三种方法所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。