增加一个404

This commit is contained in:
luchenqun 2017-04-11 19:20:57 +08:00
parent ed4d92d3cd
commit ab66ef4271
1 changed files with 30 additions and 2 deletions

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>提示-404</title> <title>提示-404</title>
@ -21,6 +22,7 @@
box-shadow: none; box-shadow: none;
position: static; position: static;
} }
#content { #content {
font-family: "微软雅黑"; font-family: "微软雅黑";
background: url("images/404.png") no-repeat 122px 0px; background: url("images/404.png") no-repeat 122px 0px;
@ -29,18 +31,23 @@
font-size: 18px; font-size: 18px;
color: #999; color: #999;
} }
#content p { #content p {
padding: 180px 0 0 426px; padding: 180px 0 0 426px;
line-height: 38px; line-height: 38px;
} }
#content p a.backhome { #content p a.backhome {
font-size: 14px; font-size: 18px;
} }
#content p a.backhome span { #content p a.backhome span {
width: 80px; width: 80px;
} }
#totalSecond {
color: #f00;
}
</style> </style>
</head> </head>
@ -49,10 +56,31 @@
<div id="content" style="height: 530px;"> <div id="content" style="height: 530px;">
<p> <p>
对不起,您的风筝已掉线,请时光倒流回前一秒。<br> 对不起,您的风筝已掉线,请时光倒流回前一秒。<br>
<a href="http://mybookmark.cn" class="adaptbtn2 btn-green42 backhome"><span class="adaptbtn2">返回首页</span></a>&nbsp;&nbsp;&nbsp;&nbsp; <span id="totalSecond">5</span>秒后自动
<a href="http://mybookmark.cn" class="backhome"><span>返回首页</span></a>
</p> </p>
</div> </div>
</div> </div>
</body> </body>
<script language="javascript" type="text/javascript">
var second = document.getElementById('totalSecond').textContent;
// 判断是IE浏览器还是Firefox浏览器采用相应措施取得秒数
if (navigator.appName.indexOf("Explorer") > -1) {
second = document.getElementById('totalSecond').innerText;
} else {
second = document.getElementById('totalSecond').textContent;
}
setInterval(function(){
if (second < 0) {
location.href = 'http://mybookmark.cn';
} else {
if (navigator.appName.indexOf("Explorer") > -1) {
document.getElementById('totalSecond').innerText = second--;
} else {
document.getElementById('totalSecond').textContent = second--;
}
}
}, 1000);
</script>
</html> </html>