Event handlers are used in HTML tags, such as <INPUT> and <BODY>, to execute JavaScript code in response to some event that occurs in the reader's page. Table 7 summarizes the event handlers, what actions trigger them, and the tags that can use them.
Table 7: Summary of JavaScript Event Handlers.
| Event Handler |
What
Actions are Triggered |
Tags |
| onBlur | When the reader moves the insertion point out of a field | select, text, textarea |
| onChange | After the reader changes the contents of a field and moves on to another field | select, text, textarea |
| onClick | When the reader clicks on an item | button, checkbox, radio, link, reset, submit |
| onFocus | When the reader moves the insertion point into a field | select, text, textarea |
| onLoad | When a document is loaded into view window | <BODY>, <FRAMESET> |
| onMouseOver | When reader points to a hyperlink link | <A>...</A> |
| onSelect | When the reader selects text within a text or text area field | text, textarea |
| onSubmit | When the reader submits a form form | <FORM> |
| onUnload | When the reader exits a document window | <BODY>, <FRAMESET> |

|
|
![]() |