From: http://blog.sina.com.cn/s/blog_8f49f0060100x48v.html statement: This article mainly for IE browser description generally close the page (or close the window), we first think of is Window.close () , but this code is very effective for Windows created with window.open (), there is no hint, and when used in the main browser window, you will get a hint: Prompt the script view to close the window and ask if you really want to close the window, which is sometimes annoying.
The following methods are available: (1) Use the following code in IE6 to avoid prompting information function Closewin () {Self.opener = Null;self.close ();} (2) Use the following code in IE7\IE8 to avoid prompting information function Closewin () {window.open (', ' _top '); Window.top.close ();} (3) In order to be common in IE, the following methods are easy to use. function Closewin () {Self.opener = Null;self.open (' ', ' _self ') (because no IE7 environment has yet been tested); Self.close (); }ps: (1) Self and window are equivalent (2) The above methods can be used in Firefox and other browsers (3) in Firefox and other browsers directly using Window.close () does not prompt whether to close the page information
JS Close window (Cancel prompt)