JavaScript 返回上一步
🌙
手机阅读
本文目录结构
一个 404 错误页;
有一个返回上一步;用的是和 javascript:; 一样思路的代码;用的是
href="javascript:history.back(-1)"
代码如下
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>您找的页面不存在</title>
<style type="text/css">
body{margin: 0;padding:0;font-size: 12px;font-family: "Microsoft YaHei", 微软雅黑, "SimSun", "Arial Narrow", HELVETICA;-webkit-user-select: none;}
.wrap{width: 600px;height: 600px;position: absolute;left: 50%;top: 100px;margin:0 0 0 -300px; }
a { color:#007ab7;text-decoration: none;}
a:hover {color:#007ab7;text-decoration: none;}
a:hover {color: #de1d6a}
/*正式样式开始*/
.img404 {width: 80px;height: 90px;padding: 0; background: url(bg.gif) no-repeat left top; float:left;position: relative;}
h2{font-size: 16px;border-bottom: #ccc solid 1px;padding-bottom: 20px;position: relative;width: 80%;margin-left: 80px;}
.wearesorry{font-size: 10px;color: #ccc;font-weight: normal;position: absolute;top:20px;left: 80px;}
.content{clear: both;font-size: 14px;position: relative;left: 80px;top: -30px;}
.content ul{color: #000101;}
/*页脚的标注*/
.broszhu{margin: 90px 0 0 30px;}
#home_top {height: 48px;line-height:48px;font-size:18; text-align: center; color:#008CD7;}
#home_bottom {color:#008CD7;text-align:center;font-size:14px;}
</style>
</head>
<body>
<div class="wrap">
<div class=img404> </div>
<h2>抱歉,找不到您要的页面……</h2>
<h3 class=wearesorry>We're sorry but the page your are looking for is Not Found...</h3>
<div class=content>仔细找过啦,没有发现你要找的页面。最可能的原因是:
<ul>
<li>在地址中可能存在键入错误。</li>
<li>当你点击某个链接时,它可能已过期。</li>
</ul>
<strong>点击以下链接继续浏览懒人图库上的其它内容</strong>(<a href="http://www.axihe.com/" target="_blank">www.axihe.com</a>):
<div class=show14>
<ul>
<li><a title=返回博客首页 href="http://www.axihe.com/">返回博客首页</a>
<li><a title=返回上一个页面 href="javascript:history.back(-1)">返回上一页</a></li>
<li>返回上一页实现的原理是,通过href="javascript:history.back(-1)"</li>
<li>title=返回上一个页面 href="javascript:history.back(-1)"</li>
</ul
</div>
要不,我们去<a href="http://www.axihe.com/" target=_blank>网站首页</a>看看吧~~
</div>
</div>
<div class="broszhu">
<h3 id="home_top">404CryPage - Powered By
<a href="http://www.axihe.com/"target="_blank">broszhu</a>
博客网址:<a href="http://www.axihe.com/" target="_blank">www.axihe.com</a>
</h3>
<p id="home_bottom">学习JavaScript是一件很有趣的事,可以做出很多自豪的小玩意!--broszhu (这个页面是实现原理:<a href="#" target="_blank">点此查看</a>)</p>
</div>
</body>
</html>