时间:2021-07-01 10:21:17 帮助过:206人阅读
代码:
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Document</title>
- </head>
- <body>
- <script type="text/javascript">
- function shut(){
- window.opener=null;
- window.open('','_self');
- window.close();
- }
- </script>
- </head>
- <body>
- <br><br><br>
- <center><input type="button" name="Submit2" value="关闭窗口" title="关闭窗口" onclick="shut()"/>
- </center>
- </body>
- </html>
相关推荐:
js实现关闭网页的代码
HTML关闭网页弹出窗口代码_html/css_WEB-ITnose
不提示直接关闭网页窗口的JS示例代码_javascript技巧
以上就是HTML如何关闭当前网页的详细内容,更多请关注Gxl网其它相关文章!