HTML and CSS Reference
Form Event Handlers
Form event handlers can be used to make forms interactive (see Table 3-13 ).
Table 3-13. Form Event Handlers
Runs the Script...
When an element lost focus
When cancelling a file upload
On element change
When an element received focus
On user input
On invalid user input
When the user clicks on the Reset button of a form
After some text has been selected in an element
When a menu element is shown as a context menu
On form submit
When the user opens or closes the details element
Window Event Handlers
The window event handlers supported by all Window objects are summarized in Table 3-14 .
Table 3-14. Window Event Handlers
Runs the Script ...
After the document is printed
Before the document is printed
Before the document is loaded
When the anchor of a URL is changed
When the message is activated
When the document goes offline
When the document comes online
When the window is hidden
When the window becomes visible
When the window history changes
( continued )