Event InformationBubbles No Cancels Yes To invoke Close the current browser window. Navigate to another location by entering a new address or selecting a Favorite. Click the Back, Forward, Refresh, or Home button. Click on an a that refers the browser to another Web page. Invoke the a?A HREF="../methods/click.html">click method. Invoke the document?A HREF="../methods/write.html">write method. Invoke the document?A HREF="../methods/open_1.html">open method. Invoke the document?A HREF="../methods/close_1.html">close method. Invoke the window?A HREF="../methods/close_0.html">close method. Invoke the window?A HREF="../methods/open_0.html">open method, providing the possible value _self for the window name. Invoke the window?A HREF="../methods/navigate.html">navigate or NavigateAndFind method. Invoke the location?A HREF="../methods/replace.html">replace method. Invoke the location?A HREF="../methods/reload.html">reload method. Specify a new value for the location?A HREF="../properties/href_3.html">href property. Submit a form to the address specified in the action attribute via the input type=submit control, or invoke the form?A HREF="../methods/submit.html">submit method.
Default action Signals that the page is about to be unloaded.
Cancels Yes
To invoke Close the current browser window.
Navigate to another location by entering a new address or selecting a Favorite.
Click the Back, Forward, Refresh, or Home button.
Click on an a that refers the browser to another Web page.
Invoke the a?A HREF="../methods/click.html">click method.
Invoke the document?A HREF="../methods/write.html">write method.
Invoke the document?A HREF="../methods/open_1.html">open method.
Invoke the document?A HREF="../methods/close_1.html">close method.
Invoke the window?A HREF="../methods/close_0.html">close method.
Invoke the window?A HREF="../methods/open_0.html">open method, providing the possible value _self for the window name.
Invoke the window?A HREF="../methods/navigate.html">navigate or NavigateAndFind method.
Invoke the location?A HREF="../methods/replace.html">replace method.
Invoke the location?A HREF="../methods/reload.html">reload method.
Specify a new value for the location?A HREF="../properties/href_3.html">href property.
Submit a form to the address specified in the action attribute via the input type=submit control, or invoke the form?A HREF="../methods/submit.html">submit method.
Default action Signals that the page is about to be unloaded.
我如何判断当前的onbeforeunload是由谁引发的。我发现,此时的event居然没有srcElement,那我如何剔出a标签引发的onbeforeunload呢?
将所有A标签改为“<a href="#" onclick="xxxxx();">tttt</a>”
是否另有好办法来剔除非真正卸载页面的事件?