<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>404错误,抱歉,出现错误了!</title> <style> body { background:#e3e2e7 } .errors { width:760px; height:640px; background:url(https://www.jimutu.cn/public/static/404/404.jpg) no-repeat; margin:70px 0 0 70px } .errors .text { width:360px; padding:14px 0 0 376px } .errors .text h4 { color:#e54919; font:36px "微软雅黑", "宋体"; font-weight:700; padding-bottom:8px } .errors .text p { line-height:22px } .errors .text p span { color:#e54919; font-weight:700; cursor:pointer; padding:0 5px } .errors .text p #downTime { cursor:default } .wrap { width:980px; padding:0 6px; margin:0 auto; overflow:hidden; visibility:visible; +display:inline-block} body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td { margin:0; padding:0 } table { border-collapse:collapse; border-spacing:0 } fieldset, img { border:0 } address, caption, cite, code, dfn, em, th, var { font-style:normal; font-weight:400 } ol, ul, li { list-style:none } h1, h2, h3, h4, h5, h6 { font-size:100% } h4 { font-size:15px; color:#666 } </style> </head> <body> <div class="wrap"> <div class="errors"> <div class="text"> <h4>抱歉,出现错误了!</h4> <p>无法访问本页面的原因是:</p> <p>所访问的页面不存在或者被管理员删除!</p> <p>将在<span id="downTime">10秒</span>后为你自动返回到上一页,</p> <p>如果您的浏览器没有自动跳转,请<span onclick="turnUrl()">点击此链接</span>。</p> </div> </div> </div> <script type="text/javascript"> var t, downSecond = 10; document.getElementById("downTime").innerHTML = downSecond + "秒"; t = setInterval(function() { downSecond --; document.getElementById("downTime").innerHTML = downSecond + "秒"; if(downSecond == 0) { clearInterval(t); turnUrl(); } }, 1000); function turnUrl() { if(history.length > 1) { history.back(); } else { window.location = "https://www.jimutu.cn/"; } } </script> </body> </html>
也可以打开演示页面直接保存到本地修改你的网址 就可以用。
打开错误页面会自动返回到上一页,不会直接返回首页。