Versión en español




Events in HTML


As well as attributes, events can be defined in HTML tags. Events, instead of giving values to the elements like the attributes, trigger actions when they occurs. These actions are defined by client-side scripts that are programs written to perform some action in a specific language (e.g., JavaScript, VBScript, etc.). There are different events that occurs in different instances according to browsers or users actions.

List of events

onload

The onload event occurs when the user agent finishes loading a window or all frames within a frameset.


onunload

The onunload event occurs when the user agent removes a document from a window or frame.


onclick

The onclick event is triggered when the mouse button is clicked over the element.


ondblclick

The ondblclick event occurs when the pointing device button is double clicked over an element.


onmousedown

The onmousedown event is triggered when the mouse button is pressed over the element.


onmouseup

The onmouseup event occurs when the pointing device button is released over an element.


onmouseover

The onmouseover event is triggered when the mouse is moved onto the element.


onmousemove

The onmousemove event occurs when the pointing device is moved while it is over an element.


onmouseout

The onmouseout event is triggered when the mouse is moved away from the element.


onfocus

The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation.


onblur

The onblur event is triggered when an element loses focus either by the pointing device or by tabbing navigation.


onkeypress

The onkeypress event occurs when a key is pressed and released over an element.


onkeydown

The onkeydown event is triggered when a key is pressed down over the element.


onkeyup

The onkeyup event occurs when a key is released over an element.


onsubmit

The onsubmit event is triggered when a form is submitted.


onreset

The onreset event occurs when a form is reset.


onselect

The onselect event is triggered when a user selects some text in a text field.


onchange

The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus.




Bypass footer options  |   Send to a friend Send to a friend  |  Post to del.icio.us Post to del.icio.us

Digg this page Digg this!  |  File on Furl File on Furl  |  Add to Yahoo! MyWeb Add to Yahoo! MyWeb

Bypass W3C declarations | 

Valid XHTML 1.0 Strict  |  Valid CSS Why should you trust us? Click the images on the left to see how seriously we write our own pages, then make your choice.

Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0. This website gives its best effort to achieve the Level Triple-A Conformance, W3C-WAI Web Content Accessibility Guidelines 1.0. If you find any detail or error that we didn't see, don't hesitate and let us know.

The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect. -- Tim Berners-Lee, W3C Director and inventor of the World Wide Web.

 Link to us  |  Contact us  |  Beyond HTML  |  Tools and resources  |  Sitemap  |  Webmaster