当前位置:Gxlcms > html代码 > HTML如何关闭当前网页

HTML如何关闭当前网页

时间:2021-07-01 10:21:17 帮助过:206人阅读

本片文章主要介绍html如何关闭当前网页以及鼠标特效,希望可以帮到大家。

代码:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Document</title>
  6. </head>
  7. <body>
  8. <script type="text/javascript">
  9. function shut(){
  10. window.opener=null;
  11. window.open('','_self');
  12. window.close();
  13. }
  14. </script>
  15. </head>
  16. <body>
  17. <br><br><br>
  18. <center><input type="button" name="Submit2" value="关闭窗口" title="关闭窗口" onclick="shut()"/>
  19. </center>
  20. </body>
  21. </html>

相关推荐:

js实现关闭网页的代码

HTML关闭网页弹出窗口代码_html/css_WEB-ITnose

不提示直接关闭网页窗口的JS示例代码_javascript技巧

以上就是HTML如何关闭当前网页的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行