日期:2014-05-16 浏览次数:20296 次
<a><script type="text/javascript">document.write(10)</script>秒钟后将返回首页</a>
<script type="text/javascript">
function jump()
{
location.href="/visitors";
}
var s=0;
function show()
{
s=s+1;
if (s>10) return;
o=document.getElementById('second');
o.innerHTML=(10-s)+'秒钟后将会跳转到首页';
}
setTimeout('jump()',10*1000);
setInterval('show()',1000);
</script>
<a id="second">10秒钟后将返回首页</a>
<script type="text/javascript">
var a=document.getElementById("second");
var i=10;
setInterval(function(){
i--;
if(i<1){
location.href="/visitors";
}else{
a.innerHTML=i+"秒钟后将返回首页";
}
},1000);
</script>