Javascript: Event Handlers

 

Event Handlers are the way that external actions are communicated to your script. An action by the user of the browser on the page triggers an event handler associated with the specific element on the page which was acted upon. For instance, an event is triggered every time the user rolls the mouse over an <A></A> tag on the script.

The following are the event handlers used in Javascript. Note that not all of these event handlers are available for every element on the page.

Event Action It Corresponds To
onAbort The user aborted loading of the page
onBlur the object was left: ie. the user moved the mouse off the object on the page, or thewindow was placed behind other windows
onChange The user changed the object
onClick the user click the mouse on the object
onError the script had an error during execution
onFocus opposite of onBlur, the user made an object active
onLoad the page or other object finished loading
onMouseover the mouse was moved over the object
onMouseout the mouse was moved off an object
onSelect the user selected the contecnts of the object
onUnload the user left the window
onSubmit the user submitted a form