js倒计时问题
<html>
<head><title></title>
<script language='javascript' type='text/javascript'>
var secs =5; //倒计时的秒数
var URL ;
function Load(url){
URL =url;
for(var i=secs;i>=0;i--)
{
window.xywTimeout('doUpdate(' + i + ')', (secs-i) * 1000);
}
}
function doUpdate(num)
{
document.getElementById('ShowDiv').innerHTML = '将在'+num+'秒后自动跳转到 脚本之家' ;
if(num == 0) { window.location=URL; }
}
</script>
</head>
<body>
<div id="ShowDiv"></div>
<script language="javascript">
Load("http://www.jb51.net");
</script>
</body>
</html>