Events
Client-side JavaScript supports a number of event types.
Table 11.2 lists the event handlers and the client-side objects that
support the handlers. Note that some events, such as onDblClick, are
not reliably generated on all platforms.
Table 11-2. Event Handlers
| Event Handler | Supported By |
|---|---|
onAbort
| Image (JavaScript 1.1) |
onBlur,onFocus
|
Text elements; Window and all other form elements (1.1) |
onChange
| Select, text input elements |
onClick
|
Button elements, Link; return |
onDblClick
|
Document, Link, Image, Button elements (1.2) |
onError
| Image, Window (1.1) |
onKeyDown
| |
onKeyPress, onKeyUp
|
Document, Image, Link, text elements (1.2); return |
onLoad, onUnload
| Window; Image in 1.1 |
onMouseDown, onMouseUp
|
Document, Link, Image, Button elements (1.2); return |
onMouseOver, onMouseOut
|
Link; Image and Layer (1.2); return |
onReset, onSubmit
|
Form (1.1); return |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access