jump.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>跳转提示</title>
  6. <style type="text/css">
  7. *{ padding: 0; margin: 0; }
  8. body{ background: #fff; font-family: "Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif; color: #333; font-size: 16px; }
  9. .system-message{ padding: 24px 48px; }
  10. .system-message h1{ font-size: 100px; font-weight: normal; line-height: 120px; margin-bottom: 12px; }
  11. .system-message .jump{ padding-top: 10px; }
  12. .system-message .jump a{ color: #333; }
  13. .system-message .success,.system-message .error{ line-height: 1.8em; font-size: 36px; }
  14. .system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display: none; }
  15. </style>
  16. </head>
  17. <body>
  18. <div class="system-message">
  19. <?php
  20. if ($code==1) {
  21. echo "<h1>:)</h1>";
  22. echo "<p class='success'>$msg</p>";
  23. } else {
  24. echo "<h1>:(</h1>";
  25. echo "<p class='error'>$msg</p>";
  26. }
  27. ?>
  28. <p class="detail"></p>
  29. <p class="jump">
  30. 页面自动 <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间: <b id="wait"><?php echo($wait);?></b>
  31. </p>
  32. </div>
  33. <script type="text/javascript">
  34. (function(){
  35. var wait = document.getElementById('wait'),
  36. href = document.getElementById('href').href;
  37. var interval = setInterval(function(){
  38. var time = --wait.innerHTML;
  39. if(time <= 0) {
  40. location.href = href;
  41. clearInterval(interval);
  42. };
  43. }, 1000);
  44. })();
  45. </script>
  46. </body>
  47. </html>