Home >Web Front-end >JS Tutorial >How to block IE pop-up 'The webpage you are viewing is trying to close the window, do you want to close this window?' _javascript skills

How to block IE pop-up 'The webpage you are viewing is trying to close the window, do you want to close this window?' _javascript skills

WBOY
WBOYOriginal
2016-05-16 17:06:114669browse

The sample code in IE6 is as follows:
window.opener= null;
window.close();

The sample code in IE7 is as follows:

window.opener= null;
window.open("","_self");
window.close();

If you want to display it in full screen (removing IE's toolbar, address bar, menu bar and other information), you can only use the window.open(); method. If the first page is to be displayed in full screen, you need to set up a transfer page. The code for the transfer page is as follows: (No need to write anything in the body)

Copy the code The code is as follows:


                                                                                                                                                                                                                                    htm', 'newwindow', 'fullScreen=1, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no');
             window .opener = null;
         window.open("", "_self");
              window.close(); 🎜>





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