>
 





The combination of JavaScript and HTML is called as DHTML (Dynamic HTML). Since not all browsers support the same level of DHTML, the events you can use and the way events work vary from browser to browser.

The following table contains the JavaScript events that are safe for browsers (Cross-Browser) that support JavaScript. 

Cross-Browser JavaScript Events
Event Description Applies To
onClick Occurs when the user clicks on a control button, area, checkbox, radio, link
onChange Occurs when the user changes value in an iput control. The event fires after user changes focus to another control in text controls select, text, textarea
onFocus Occurs when a control is focused select, text, textarea
onBlur Occurs when focus leaves a control select, text, textarea
onLoad Occurs when a page finishes downloading window, location
onUnload Occurs after a link has been clicked or a new URL has been entered just before the download of the new page. window
onMouseOver Occurs when the user moves the mouse over a control link, area
onMouseOut Occurs when the user moves the mouse away from a control link, area
onKeyUp Occurs when the user releases a key text, textarea
onKeyDown Occurs when the user presses a key text, textarea
onSelect Occurs when the user selects a text on an input control text, textarea
onAbort Occurs when the user cancels an image download image
onError Occurs when an image cannot be downloaded image


The JavaScript events listed above are tested on:


For more details on Javascript event compatibility: Event compatibility tables

Want automatic updates? Subscribe to our RSS feed or
Get Email Updates sent directly to your inbox!

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Comments

October 22. 2009 18:09

Social comments and analytics for this post

This post was mentioned on Twitter by bloggingdev: Cross-Browser JavaScript Events - Commonly Supported Events that are Safe to Use - http://su.pr/4gabzT

uberVU - social comments | Reply

November 6. 2009 13:36

In computing, a mouse (plural mouses, mice, or mouse devices.) is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface. Physically, a mouse consists of an object held under one of the user's hands, with one or more buttons. It sometimes features other elements, such as "wheels", which allow the user to perform various system-dependent operations, or extra buttons or features can add more control or dimensional input. The mouse's motion typically translates into the motion of a pointer on a display, which allows for fine control of a Graphical User Interface.

SEO | Reply

Add comment




(Will not be displayed!)








Free CMS