跳转的时间

来源:百度知道 编辑:UC知道 时间:2024/06/22 11:57:31
帮我看看下面代码哪个是自动跳转的时间
<SCRIPT>i=1
var autourl=new Array()
autourl[0]="http://XXXX/.COM/index.html"
autourl[1]="http://XXXX.COM/index.html"
autourl[2]="http://XXXX.com/index.html"
function auto(url){if(i){i=0;top.location=url}}
function run(){for(var i=1;i<autourl.length;i++)document.write("<img src="+autourl[i]+" width=1 height=1 onerror=auto('"+autourl[i]+"')>")}
run()</SCRIPT>
我是要自动跳转的时间

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>出错拉!</title>
</head>

<body>
<center>
<br><br><br><br><br><br><br>
无法直接访问该页,请从首页登录后访问<br><br>
<span id="sec" style="color:red"></span>秒钟返回
<br>

<br>如果浏览器没有响应,你可以直接点击<a href="http://www.baidu.com">这里</a>
</center>
<script>
var secs = 6;
for(i=0;i<=secs;i++) {
window.setTimeout("update(" + i + ")", i * 1000);
}

function update(num) {
if(num == secs) {
window.location="http://www.baidu.com";