有什么办法 可以让一个页面延迟30秒再执行

kaxi 2002-11-19 05:13:06
我想在一个页里里完成 不要用循环的 这样太费CPU
也不要用框架的 有没有好的办法呀
...全文
143 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
blues-star 2003-02-27
  • 打赏
  • 举报
回复
<script id="container"></script>

<script>
setTimeout("container.src = '****.asp'",30000);
</script>
Go_Rush 2003-02-27
  • 打赏
  • 举报
回复
<script>
function window.onload(){
window.setTimeout(myfunc,30000)
}

function myfunc(){
//delete files
}
</script>
goodli 2003-02-27
  • 打赏
  • 举报
回复
<% 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) %>

浙江云 2003-02-27
  • 打赏
  • 举报
回复
up
gz
kaxi 2002-11-19
  • 打赏
  • 举报
回复
有没有类似的例子
goddy123 2002-11-19
  • 打赏
  • 举报
回复
用javascript来控制
kaxi 2002-11-19
  • 打赏
  • 举报
回复
延迟30秒 是为了删除一个文件
在页页开始时 会生成一个临时文件 让用户读取
为了防止删除的太快 怕用户读不到 所以想延迟几秒 再删除
goddy123 2002-11-19
  • 打赏
  • 举报
回复
你想延迟30秒执行什么?
是显示剩余的网页,还是执行某个程序?
kaxi 2002-11-19
  • 打赏
  • 举报
回复
刷新本页不行的 假如我要在当页看电影 这么一刷 还要从头开始看了
wpmsoft 2002-11-19
  • 打赏
  • 举报
回复
用refresh,30秒后重新显示本页面
<meta http-equiv="refresh" content="30;url=thispage.html">

--------------------
与人玫瑰,手有余香
--------------------
kaxi 2002-11-19
  • 打赏
  • 举报
回复
有没有别的 办法哪
不要跳转的 就在一个页里边执行
cqfeng 2002-11-19
  • 打赏
  • 举报
回复
用refresh,30秒后转到另一页
<meta http-equiv="refresh" content="30;url=yourpage.html">

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧