JavaScript in the Browser

MouseEvent Types

click
The click event occurs when the pointing device button is clicked over an element. A click is defined as a mousedown and mouseup over the same screen location. The sequence of these events is:
    mousedown
    mouseup
    click
   
If multiple clicks occur at the same screen location, the sequence repeats with the detail attribute incrementing with each repetition. This event is valid for most elements.
  • Bubbles: Yes
  • Cancelable: Yes
  • Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail
mousedown
The mousedown event occurs when the pointing device button is pressed over an element. This event is valid for most elements.
  • Bubbles: Yes
  • Cancelable: Yes
  • Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail
mouseup
The mouseup event occurs when the pointing device button is released over an element. This event is valid for most elements.
  • Bubbles: Yes
  • Cancelable: Yes
  • Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail
mouseover
The mouseover event occurs when the pointing device is moved onto an element. This event is valid for most elements.
  • Bubbles: Yes
  • Cancelable: Yes
  • Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, relatedTarget indicates the EventTarget the pointing device is exiting.
mousemove
The mousemove event occurs when the pointing device is moved while it is over an element. This event is valid for most elements.
  • Bubbles: Yes
  • Cancelable: No
  • Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey
mouseout
The mouseout event occurs when the pointing device is moved away from an element. This event is valid for most elements..
  • Bubbles: Yes
  • Cancelable: Yes
  • Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, relatedTarget indicates the EventTarget the pointing device is entering.

José M. Vidal .

49 of 66