JavaScript MouseEvent Properties

You are Here:

JavaScript MouseEvent Properties

The following are the list of MouseEvent properties available in JavaScript programming.

FunctionsExplanation
altkeyIndicates whether the alt key was pressed or not when a given mouse event occurs.
buttonIndicates which mouse button was pressed on the mouse to trigger the event.
buttonsIndicates which mouse button or buttons were pressed on the mouse to trigger the event.
clientXReturns the horizontal coordinate within the application's client area at which the event occurred.
clientYReturns the vertical coordinate within the application's client area at which the event occurred.
ctrlKeyIndicates whether the ctrl key was pressed or not when a given mouse event occurs.
detailReturns the number of consecutive click by the user.
metaKeyIndicates whether the meta key was pressed or not when a given mouse event occurs.
movementXReturns the difference in the X coordinate of the mouse pointer between the given event and the previous mousemove event.
movementYReturns the difference in the Y coordinate of the mouse pointer between the given event and the previous mousemove event.
offsetXReturns the x-coordinate (horizontal-coordinate) of the mouse pointer, relative to the target element.
offsetYReturns the y-coordinate (vertical-coordinate) of the mouse pointer, relative to the target element.
pageXReturns the horizontal coordinate of the mouse pointer in pixels of the event relative to the whole document.
pageYReturns the vertical coordinate of the mouse pointer in pixels of the event relative to the whole document.
screenXReturns the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates.
screenYReturns the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.
shiftKeyIndicates whether the shift key was pressed or not when a given mouse event occurs.
relatedTargetReturns the node name from which the mouse pointer comes from.

Reminder

Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author