倒数计时进入页面

来源:互联网 发布:电脑软件停止工作 编辑:程序博客网 时间:2024/05/01 02:18
<form name="redirect">
<center><font color="#800080">
<font face="Arial"><b>10</b></font><b>秒後您将进入首页<font face="Arial">...</font>开始</b></font><b><font color="#800080" size="3">计时</font>
<input type="text" size="3" name="redirect2"></b> 
<font color="#008000"><font face="Arial"><b>seconds</b></font> 
</font> </center><script> 
<!-- 
//change below target URL to your own 
var targetURL="http://htmlsource.yeah.net" 
//change the second to start counting down from 
var countdownfrom=10 


var currentsecond=document.redirect.redirect2.value=countdownfrom+1 
function countredirect(){ 
if (currentsecond!=1){ 
currentsecond-=1 
document.redirect.redirect2.value=currentsecond 

else{ 
window.location=targetURL 
return 

setTimeout("countredirect()",1000) 


countredirect() 
//--> 
</script> 
</form>

 

 
原创粉丝点击