5秒倒数跳转页面
<body>
<h1 align="center">插入成功</h1>
<h3 align="center"id="p1"></h3>
<script language="vbscript">
i = 5
sub a()
do while i>0
p1.InnerHtml =""
S = i&"秒后自动跳转<a href='管理员名单.asp'>管理员名单</a>页面"
p1.InnerHtml = S
i = i-1
document.write i
loop
//SetTimeOut "a()",1000
end sub
a()
//SetTimeOut "a()",1000
</script>
</body>
这个思路有问题吗 每次都输出是循环最后一个
难道不能用循环吗?
结果怎么写成动态的。
[解决办法]
<div id="msg"></msg><script type="text/javascript">var times=10;function test(){document.getElementById("msg").innerHTML="页面将在"+times+"后跳转";times-=1;if(times<=0){window.clearInterval(doTEST);window.location.href="http://www.370b.com";}}var doTEST;window.clearInterval(doTEST);doTEST=window.setInterval("test()",1000);</script>http://rayyu.5d6d.com/viewthread.php?tid=9046&highlight=%B5%B9%BC%C6%CA%B1