function mm(){ window.opener=null;window.close();}" method to automatically close the page. Can."/> function mm(){ window.opener=null;window.close();}" method to automatically close the page. Can.">

Home >Web Front-end >HTML Tutorial >How to automatically close the page in html

How to automatically close the page in html

藏色散人
藏色散人Original
2021-05-25 10:29:035263browse

htmlMethod to automatically close the page: first open the corresponding HTML code file; then pass "3f1c4e4b6b16bbbd69b2ee476dc4f83afunction mm(){ window.opener=null;window.close();}

How to automatically close the page in html

The operating environment of this article: Windows7 system, HTML5 version, DELL G3 computer

How does html automatically close the page?

The code is implemented as follows: Parameter 10 in

<body onload=&#39;setTimeout("mm()",10)&#39;>
<script>function mm(){ window.opener=null;
window.close();} </script>
</body>

can be modified at will. The larger it is, the longer it will take. 0 means it will be closed when it is opened directly.

Recommended study: "HTML Video Tutorial"

The above is the detailed content of How to automatically close the 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
Previous article:How to play video in htmlNext article:How to play video in html