Mouse events
Widely available
Mouse events, such as click
, mousedown
, or mousemove
, fire when users interact with an input or pointing device such as a mouse, trackpad, or touchscreen.
Compatibility
- Chrome 1 Released on 2008-12-11
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 1 Released on 2004-11-09
- Firefox for Android 4 Released on 2011-03-29
- Safari 1 Released on 2003-06-23
- Safari on iOS 1 Released on 2007-06-29
MDN docs
- Element.click_event
- Element.dblclick_event
- Element.mousedown_event
- Element.mouseenter_event
- Element.mouseleave_event
- Element.mousemove_event
- Element.mouseout_event
- Element.mouseover_event
- Element.mouseup_event
- MouseEvent
- MouseEvent.MouseEvent
- MouseEvent.altKey
- MouseEvent.button
- MouseEvent.buttons
- MouseEvent.clientX
- MouseEvent.clientY
- MouseEvent.ctrlKey
- MouseEvent.getModifierState
- MouseEvent.metaKey
- MouseEvent.movementX
- MouseEvent.movementY
- MouseEvent.offsetX
- MouseEvent.offsetY
- MouseEvent.pageX
- MouseEvent.pageY
- MouseEvent.relatedTarget
- MouseEvent.screenX
- MouseEvent.screenY
- MouseEvent.shiftKey
- MouseEvent.x
- MouseEvent.y
Specifications
- UI Events, from Web Applications Working Group (W3C).
BCD data
- api.Element.click_event
- api.Element.dblclick_event
- api.Element.mousedown_event
- api.Element.mouseenter_event
- api.Element.mouseleave_event
- api.Element.mousemove_event
- api.Element.mouseout_event
- api.Element.mouseover_event
- api.Element.mouseup_event
- api.MouseEvent
- api.MouseEvent.MouseEvent
- api.MouseEvent.altKey
- api.MouseEvent.button
- api.MouseEvent.buttons
- api.MouseEvent.clientX
- api.MouseEvent.clientY
- api.MouseEvent.ctrlKey
- api.MouseEvent.getModifierState
- api.MouseEvent.metaKey
- api.MouseEvent.movementX
- api.MouseEvent.movementY
- api.MouseEvent.offsetX
- api.MouseEvent.offsetY
- api.MouseEvent.pageX
- api.MouseEvent.pageY
- api.MouseEvent.relatedTarget
- api.MouseEvent.screenX
- api.MouseEvent.screenY
- api.MouseEvent.shiftKey
- api.MouseEvent.x
- api.MouseEvent.y