首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

五秒倒数跳转页面

2012-08-11 
5秒倒数跳转页面bodyh1 aligncenter插入成功/h1h3 aligncenteridp1/h3script languag

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>


这个思路有问题吗 每次都输出是循环最后一个
难道不能用循环吗?


结果怎么写成动态的。

[解决办法]

JScript code
<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 

热点排行