Home  >  Article  >  Web Front-end  >  How to close the current web page in HTML

How to close the current web page in HTML

墨辰丷
墨辰丷Original
2018-05-11 14:16:2911274browse

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(&#39;&#39;,&#39;_self&#39;);  
        window.close();  
    }  
    </script>  
    </head>  
    <body>  
    <br><br><br>  
    <center><input type="button" name="Submit2" value="关闭窗口" title="关闭窗口" onclick="shut()"/>  
    </center>  
</body>
</html>

Related recommendations:

js to close the web page Code

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn