additional events handlers

ONBLUR - the agent leaves an element that was previously in focus

A, AREA, BUTTON, INPUT , LABEL, SELECT, TEXTAREA

--------------------------------------------------------------------------------

ONCHANGE - the agent modifies the value or contents of the element

INPUT, SELECT, TEXTAREA

--------------------------------------------------------------------------------

ONCLICK - the agent clicks on the specified area

All elements except APPLET, BASE, BASEFONT, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, META, PARAM, SCRIPT, STYLE, TITLE

--------------------------------------------------------------------------------

ONDBLCLICK Same as ONCLICK the agent double clicks the specified area

--------------------------------------------------------------------------------

ONFOCUS - the agent selects, clicks, or tabs to the specified element

A, AREA, BUTTON, INPUT, LABEL, SELECT, TEXTAREA

--------------------------------------------------------------------------------

ONKEYDOWN INPUT - the agent types something in the specified element (of type NAME or PASSWORD), TEXTAREA

--------------------------------------------------------------------------------

ONKEYPRESS INPUT ( the agent types something in the specified element of type NAME or PASSWORD), TEXTAREA

--------------------------------------------------------------------------------

ONKEYUP INPUT the agent lets go of the key after typing in the specified element (of type NAME or PASSWORD), TEXTAREA

--------------------------------------------------------------------------------

ONLOAD the page is loaded in the browser BODY, FRAMESET

--------------------------------------------------------------------------------

ONMOUSEDOWN the agent presses the mouse button down over the element Same as ONCLICK

--------------------------------------------------------------------------------

ONMOUSEMOVE the agent moves the mouse over the specified element after having pointed at it Same as ONCLICK

--------------------------------------------------------------------------------

ONMOUSEOUT the agent moves the mouse away from the specified element after having been over it Same as ONCLICK

--------------------------------------------------------------------------------

ONMOUSEOVER the agent points the mouse at the element Same as ONCLICK

--------------------------------------------------------------------------------

ONMOUSEUP the agent lets the mouse button go after having clicked on the element Same as ONCLICK

--------------------------------------------------------------------------------

ONRESET FORM the agent clicks the formÕs reset button (not INPUT of type RESET)

--------------------------------------------------------------------------------

ONSELECT INPUT (of type NAME or PASSWORD), TEXTAREA the agent selects one or more characters or words in the element

--------------------------------------------------------------------------------

ONSUBMIT FORM (not INPUT of type SUBMIT) the agent 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.

 
Imsg
Discussion

Blogging

E-mail

 

JAVASCRIPT    -    LESSON 3
Event - handlers