error.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <html dir="ltr" lang="zh" i18n-processed=""><head>
  2. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  3. <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no">
  4. <title></title>
  5. </head>
  6. <style>
  7. #main-frame-error{
  8. margin: 0px auto;
  9. width: 50%;
  10. margin-top: 15%;
  11. }
  12. #main-frame-error p{
  13. font-size: 30px;
  14. }
  15. button{
  16. background: rgb(66, 133, 244);
  17. border: 0;
  18. border-radius: 2px;
  19. box-sizing: border-box;
  20. color: #fff;
  21. cursor: pointer;
  22. font-size: .875em;
  23. padding: 10px 24px;
  24. transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
  25. user-select: none;
  26. margin-top: 20px;
  27. }
  28. strong{
  29. color:rgb(100, 100, 100)
  30. }
  31. .error-code{
  32. color: #aba8a8;
  33. margin-top: 20px;
  34. }
  35. </style>
  36. <body style="font-family: 'Segoe UI',Arial,'Microsoft Yahei',sans-serif;">
  37. <div id="main-frame-error" class="interstitial-wrapper">
  38. <div id="main-content" >
  39. <div id="main-message">
  40. <p>无法访问此网站</p>
  41. <strong></strong>
  42. <div class="error-code"></div>
  43. </div>
  44. </div>
  45. <div>
  46. <button onclick="window.location.href=url">重新加载</button>
  47. </div>
  48. </div>
  49. </body>
  50. <script>
  51. function get (url) {
  52. url=url?url:location.search; //获取url中"?"符后的字串
  53. var param = {},strs;
  54. if (url.split("?").length>1) {
  55. strs = url.split("?")[1].split("&");
  56. for(var i = 0; i < strs.length; i ++) {
  57. param[strs[i].split("=")[0]]=decodeURIComponent(strs[i].split("=")[1]);
  58. }
  59. }
  60. return param;
  61. };
  62. let query=get();
  63. let url=query.url;
  64. let msg=query.msg;
  65. document.title=document.getElementsByTagName('strong')[0].innerHTML=url;
  66. document.getElementsByClassName('error-code')[0].innerHTML=msg;
  67. </script>
  68. </html>