![]() |
![]() |
|
EVENT | WORKS WITH | WHEN |
---|---|---|
|
||
ONBLUR | A, AREA, BUTTON, INPUT , LABEL, SELECT, TEXTAREA | the visitor leaves an element that was previously in focus (see ONFOCUS below) |
|
||
ONCHANGE | INPUT, SELECT, TEXTAREA | the visitor modifies the value or contents of the element |
|
||
ONCLICK | All elements except APPLET, BASE, BASEFONT, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, META, PARAM, SCRIPT, STYLE, TITLE | the visitor clicks on the specified area |
|
||
ONDBLCLICK | Same as ONCLICK | the visitor double clicks the specified area |
|
||
ONFOCUS | A, AREA, BUTTON, INPUT, LABEL, SELECT, TEXTAREA | the visitor selects, clicks, or tabs to the specified element |
|
||
ONKEYDOWN | INPUT (of type NAME or PASSWORD), TEXTAREA | the visitor types something in the specified element |
|
||
ONKEYPRESS | INPUT (of type NAME or PASSWORD), TEXTAREA | the visitor types something in the specified element |
|
||
ONKEYUP | INPUT (of type NAME or PASSWORD), TEXTAREA | the visitor lets go of the key after typing in the specified element |
|
||
ONLOAD | BODY, FRAMESET | the page is loaded in the browser |
|
||
ONMOUSEDOWN | Same as ONCLICK | the visitor presses the mouse button down over the element |
|
||
ONMOUSEMOVE | Same as ONCLICK | the visitor moves the mouse over the specified element after having pointed at it |
|
||
ONMOUSEOUT | Same as ONCLICK | the visitor moves the mouse away from the specified element after having been over it |
|
||
ONMOUSEOVER | Same as ONCLICK | the visitor points the mouse at the element |
|
||
ONMOUSEUP | Same as ONCLICK | the visitor lets the mouse button go after having clicked on the element |
|
||
ONRESET | FORM (not INPUT of type RESET) | the visitor clicks the formÕs reset button |
|
||
ONSELECT | INPUT (of type NAME or PASSWORD), TEXTAREA | the visitor selects one or more characters or words in the element |
|
||
ONSUBMIT | FORM (not INPUT of type SUBMIT) | the visitor clicks the formÕs submit button |
|
||
ONUNLOAD | BODY, FRAMESET | the browser loads a different page after the specified page had been loaded |
An intrinsic event determines when an associated script will run. However, not every intrinsic event works with every HTML element. This table illustrates which events and tags work together. For more information about intrinsic events and scripting, please consult Chapter 16 in my book HTML 4 for the World Wide Web: Visual QuickStart Guide, by Elizabeth Castro, published by Peachpit Press.
©Copyright 1998 by Elizabeth Castro. All rights reserved. |