国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

asp 延時 頁面延遲的三種方法

2024-05-04 11:00:19
字體:
來源:轉載
供稿:網友
ASP頁面延遲的兩個簡單方法
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,不推薦訪問量大的站使用……
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 尚义县| 海阳市| 平度市| 隆德县| 朝阳区| 海丰县| 镇宁| 高安市| 华池县| 苏尼特右旗| 闵行区| 黑河市| 甘谷县| 丹棱县| 化州市| 电白县| 潼南县| 灵璧县| 石河子市| 博兴县| 平乡县| 深圳市| 曲沃县| 亚东县| 右玉县| 荃湾区| 肃北| 锡林郭勒盟| 广元市| 永善县| 南部县| 新建县| 浮山县| 嘉黎县| 米林县| 富平县| 准格尔旗| 新源县| 洛浦县| 宣武区| 景宁|