Javascript events :
As you can tell from the input examples, Javascript is an event driven language which means
your scripts react to events you set up. Your code isn't running all the time, it simply waits until
an event starts something up! Going into all the Javascript events is beyond the scope of this
document but here's a short-list of common events to get you started.
Event : onAbort
Description: An image failed to load.
Event : onBeforeUnload
Description: The user is navigating away from a page
Event : onBlur
Description: A form field lost the focus (User moved to another field)
Event : onChange
Description: The contents of a field has changed.
Event : onClick
Description: User clicked on this item.
Event : onDblClick
Description: User double-clicked on this item.
Event : onError
Description: An error occurred while loading an image.
Event : onFocus
Description: User just moved into this form element
Event : onKey
Description: Down A key was pressed
Event : onKeyPress
Description: A key was pressed OR released.
Event : onKeyUp
Description: A key was released.
Event : onLoad
Event : onUnload
Description: This object (iframe, image, script) finished loading.
Event : onMouseDown
Event : onMouseOver
Description: The mouse moved over this element.
Event : onMouseUp
Event : onReset
Event : onResize
Event : onSelect
Event : onSubmit
Description: A mouse button was pressed.
Event : onMouseMove
Event : onMouseOut
Description: The mouse moved.
Description: A mouse moved off of this element.
Description: The mouse moved over this element.
Description: The mouse button was released.
Description: A form reset button was pressed.
Description: The window or frame was resized.
Description: Text has been selected.
Description: A form's Submit button has been pressed.
Description: The user is navigating away from a page.
These events can be attached to most any HTML tag or form element. Of them all onClick will probably be what you end up using most often.
These events can be attached to most any HTML tag or form element. Of them all onClick will probably be what you end up using most often.
Post a Comment