document.onload = window.close();" statement. close() is used to close the browser window."/> document.onload = window.close();" statement. close() is used to close the browser window.">
Home > Article > Backend Development > How to automatically close the current page in php
How PHP automatically closes the current page: Use the echo function to output the "7c6ecc2a75ade4ffa1f50134f6be3b0edocument.onload = window.close();2cacc6d41bbb37262a98f745aa00fbf0" statement. close() is used to close the browser window.
The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
php automatically closes the current page
<?php echo "<script type='text/javascript'>document.onload = window.close();</script>"; ?>
Description:
echo() function outputs one or more strings.
The close() method of window is used to close the browser window.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to automatically close the current page in php. For more information, please follow other related articles on the PHP Chinese website!