电脑软硬件应用网
当前位置: 电脑软硬件应用网 > 设计学院 > 网络编程 > ASP教程 > 正文
解决页面延迟的两个方法
解决页面延迟的两个方法
2010-4-9 9:14:36  文/网络收集   出处:电脑软硬件应用网   

一、  
<% 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) %>

  • 上一篇文章:

  • 下一篇文章:
  • 最新热点 最新推荐 相关文章
    三种中文分词算法优劣比较
    ASP教程:删除记录和链接数据库程序解…
    ASP生成html或者txt文件实例
    分享常用7款天气预报代码iframe嵌入…
    ASP错误信息解决:IIS启用父路径的设…
    禁止网页缓存的方法及代码
    推荐如何抓取显示防盗链图片的方法
    为什么浏览不了dreamweaver中ASP文件…
    asp入门教程之讲解ASP脚本执行的顺序
    asp将access数据导出为excel电子表的…
    关于45IT | About 45IT | 联系方式 | 版权声明 | 网站导航 |

    Copyright © 2003-2011 45IT. All Rights Reserved 浙ICP备09049068号