JavaScript Reference/Event Handlers Reference/onUnload
Содержание
"onUnload" Example
<html>
<body onunload="alert("Exiting the page!")">
</body>
</html>
"onUnload" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<body> <frameset> |
| |window |
+----------------+--------------------------------------------------------------+
"onUnload" Properties
+----------------+--------------------------------------------------------------+
| Properties |altKey altLeft |
| |ctrlLeft shiftLeft |
| |type |
+----------------+--------------------------------------------------------------+
"onUnload" Syntax and Note
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.