HTML onunload event properties
Browser Support
All major browsers support onunload event attributes
Definition and Usage
onunload attribute triggered when the user closes a page.
onunload the user leaves the page (by clicking on the link, submit a form, close the browser window, etc.) trigger.
Note: If you reload the page, unload event is triggered ( the onload event).
Differences between HTML 4.01 and HTML5
None.
grammar
<elementonunload=" script ">
Property Value
值 | 描述 |
---|---|
script | 规定该onunload事件触发时执行的脚本。 |
HTML Event Attributes