Javascript – mouse events

Events

A small list with the most common mouse events.

  • click – occurs when you click on an element
  • dblclick – occurs when you click on an element
  • mousedown – occurs when you press a mouse button down over an element
  • mouseup – occurs when you release a mouse button over an element
  • mousemove – occurs when the pointer is moving while it is over an element
  • mouseenter – occurs when the pointer is moved onto an element
  • mouseleave – occurs when the pointer is moved out of an element
  • mouseover – occurs when the pointer is on an elements or it’s elements
  • contextmeny – occurs when you right-click an element

Properties

Most common properties

  • button – returns the button
  • clientX clientY – returns the x and y relative to the element
  • pageX pageY – returns the x and y relative to the page
  • screenX screenY – returns the x and y relative to the screen
  • altkey ctrlkey shiftkey – returns true if it was clicked
  • detail – how many times the mouse was clicked

, <span>Javascript – mouse events</span>, KandZ
onmouseover

, <span>Javascript – mouse events</span>, KandZ
mouseover
102800cookie-checkJavascript – mouse eventsJavascript – mouse events

Related posts