JavaScript Reference/Event Handlers Reference/onUnload
Содержание
"onUnload" Example
<source lang="javascript">
<html> <body onunload="alert("Exiting the page!")"> </body> </html>
</source>
"onUnload" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<body> <frameset> | | |window | +----------------+--------------------------------------------------------------+
</source>
"onUnload" Properties
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Properties |altKey altLeft | | |ctrlLeft shiftLeft | | |type | +----------------+--------------------------------------------------------------+
</source>
"onUnload" Syntax and Note
<source lang="javascript">
Note:
This event fires before the document begins to unload. The document will unload when
1)the user clicks the close button in the browser window, or 2)when the user goes to a different page. </source>