events are often used in conjunction with functions to drive function execution through events that occur. Event handle
One of the new features of HTML 4.0 is the ability to enable HTML events to trigger actions in the browser, such as starting a piece of JavaScript when the user clicks on an HTML element. The following is a list of attributes that can be inserted into an HTML tag to define an event action.
Properties |
This event occurs when the following conditions occur |
FF |
N |
IE |
Onabort |
Image load is interrupted |
1 |
3 |
4 |
Onblur |
Element loses focus |
1 |
2 |
3 |
OnChange |
User changes the contents of a domain |
1 |
2 |
3 |
OnClick |
Mouse click on an object |
1 |
2 |
3 |
OnDblClick |
Mouse double-click an object |
1 |
4 |
4 |
OnError |
An error occurred while loading a document or image |
1 |
3 |
4 |
onfocus |
Element gets focus |
1 |
2 |
3 |
OnKeyDown |
The key of a keyboard is pressed |
1 |
4 |
3 |
onkeypress |
Key of a keyboard is pressed or pressed |
1 |
4 |
3 |
OnKeyUp |
The key of a keyboard is loosened |
1 |
4 |
3 |
OnLoad |
A page or image is finished loading |
1 |
2 |
3 |
OnMouseDown |
A mouse button is pressed |
1 |
4 |
4 |
OnMouseMove |
Mouse is moved |
1 |
6 |
3 |
onmouseout |
The mouse moves away from an element |
1 |
4 |
4 |
onmouseover |
The mouse is moved above an element |
1 |
2 |
3 |
OnMouseUp |
A mouse button is released |
1 |
4 |
4 |
OnReset |
Reset button is clicked |
1 |
3 |
4 |
OnResize |
The window or frame is resized |
1 |
4 |
4 |
Onselect |
Text is selected |
1 |
2 |
3 |
OnSubmit |
Submit button is clicked |
1 |
2 |
3 |
OnUnload |
User Exit Page |
1 |
2 |
3 |
JavaScript Event Reference Manual