| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1352 人关注过本帖
标题:页面延迟的两个简单方法
只看楼主 加入收藏
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
快速回复:页面延迟的两个简单方法
数据加载中...
 
   



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

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