<html>
<head>
<script type="text/javascript">
<!--
var duration=2900;
var timer=null;
var endTime = new Date().getTime() + duration + 100;
function interval()
{
var n=(endTime-new Date().getTime())/1000;
if(n<0) return;
document.getElementById("timeout").innerHTML = n.toFixed(3);
setTimeout(interval, 10);
}
function stopJump()
{
clearTimeout(timer);
document.getElementById("jumphint").style.display = "none";
}
window.onload=function()
{
timer=setTimeout("window.location.href='
http://www.baidu.com'", duration);
interval();
}
//-->
</script>
</head>
<body>
<h1>出错啦!!</h1>
对不起! 你所访问的页面出错或者不存在!<br />
<span id="jumphint">系统在 <span id="timeout">3.000</span> 秒后 将自动</span>跳转到 <a href="
http://www.baidu.com">baidu首页</a><br />
</body>
</html>
参考资料:http://hi.baidu.com/mdslsh/blog/item/8ddda3feb6832d305c6008b4.html
本回答被网友采纳