<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>404</title>
<style>
	body{
		background-color:#444;
		font-size:14px;
	}
	h3{
		font-size:60px;
		color:#eee;
		text-align:center;
		padding-top:30px;
		font-weight:normal;
	}
	.toto{
		font-size:16px; color:#fff; text-align:center;
	}
	.toto a{
		color:#fff;
	}
	.toto p{
		display:block;
	}
</style>
</head>

<body>
<h3>404，您请求的文件不存在!</h3>
<div class="toto">
	<p class="tm">本页<span id="time">5</span>秒内自动跳转...</p>
	<p class="btn"><a id="Btn" href="/">返回首页</a></p>
</div>

<script type="text/javascript">

function sendStats(){
    var n = "log_"+ (new Date()).getTime();
    var c = window[n] = new Image();
    c.onload = (c.onerror=function(){window[n] = null;});
    c.src = '/';
    c = null;  
}

var time = document.getElementById('time');
var btn = document.getElementById('Btn');
function count(){
    if( +time.innerHTML > 0 ){
        time.innerHTML = time.innerHTML - 1;
    }else{
        sendStats();
        location.href = btn.href;
    }
}
setInterval(count , 1000);

btn.onclick = function(){
    sendStats();
};

</script>
</body>
</html>