forked from yanhaijing/yanhaijing.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.html
37 lines (36 loc) · 1.38 KB
/
404.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<title>404</title>
<meta name="keywords" content="yanhaijing, 颜海镜, 博客, 颜海镜的博客, web, web前端, html, css, javascript, php" />
<meta name="description" content="颜海镜的博客404页面" />
<meta name="author" content="颜海镜">
</head>
<body>
<script src="/assets/plugin/jquery/jquery-1.11.3.min.js"></script>
<script>
// 自动匹配名字相同的博文,自动跳转
var name = location.pathname.slice(0, -1).split('/').pop();
$.ajax({
url: '/sitemap.txt'
})
.done(function(ret) {
$.each(ret.split('\n'), function (k, v) {
if (v.indexOf(name) > 0) {
location.href = v;
return false;
}
});
})
.fail(function() {
})
.always(function() {
});
$(window).on('load', function () {
$('.desc_link').html('返回首页').prop('href', '/');
});
</script>
<script type="text/javascript" src="http://www.qq.com/404/search_children.js" charset="utf-8" homePageUrl="http://yanhaijing.com" homePageName="返回首页"></script>
</body>
</html>