You can use JavaScript in setTimeout() Function to achieve the effect of automatic page closing. Here is a sample code:
setTimeout(function() {
window.close();
}, 3000);In this code,setTimeout() The function will call an anonymous function after 3 seconds, and the anonymous function will call window.close() Method closes the current page. So, after executing the above code, the page will automatically close after 3 seconds.
It should be noted that this code can only be used in the same source page of the opened window or tab. Otherwise, an error will be reported.