Mouse Event Reference


Google
The following events are triggered by a mouse or similar user actions, and these events apply to all HTML5 elements:

click Triggered on a mouse click

dblclick Triggered on a mouse double-click

drag Triggered when an element is dragged

dragend Triggered at the end of a drag operation

dragenter Triggered when an element has been dragged to a valid drop target

dragleave Triggered when an element leaves a valid drop target

dragover Triggered when an element is being dragged over a valid drop target

dragstart Triggered at the start of a drag operation

drop Triggered when the dragged element is being dropped

mousedown Triggered when a mouse button is pressed

mousemove Triggered when the mouse pointer moves

mouseout Triggered when the mouse pointer moves out of an element

mouseover Triggered when the mouse pointer moves over an element

mouseup Triggered when a mouse button is released

mousewheel Triggered when the mouse wheel is being rotated

scroll Triggered when an element’s scrollbar is being scrolled

 

The following is an example of subscribing to a mouse event on the lastName text box:

lastName.addEventLiDstener('click', gotClicked, false);
function gotClicked (e){
  alert('Got Clicked');
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s