Home >Web Front-end >HTML Tutorial >How to close the current web page in HTML
This article mainly introduces how to close the current web page and mouse effects in HTML. I hope it can help everyone.
Code:
<!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>
Related recommendations:
HTML close web page pop-up window code_html/css_WEB-ITnose
JS sample code to close the web page window without prompting_javascript skills
The above is the detailed content of How to close the current web page in HTML. For more information, please follow other related articles on the PHP Chinese website!