JavaScript MouseEvent Properties
You are Here:
JavaScript MouseEvent Properties
The following are the list of MouseEvent properties available in JavaScript programming.
Functions | Explanation |
---|---|
altkey | Indicates whether the alt key was pressed or not when a given mouse event occurs. |
button | Indicates which mouse button was pressed on the mouse to trigger the event. |
buttons | Indicates which mouse button or buttons were pressed on the mouse to trigger the event. |
clientX | Returns the horizontal coordinate within the application's client area at which the event occurred. |
clientY | Returns the vertical coordinate within the application's client area at which the event occurred. |
ctrlKey | Indicates whether the ctrl key was pressed or not when a given mouse event occurs. |
detail | Returns the number of consecutive click by the user. |
metaKey | Indicates whether the meta key was pressed or not when a given mouse event occurs. |
movementX | Returns the difference in the X coordinate of the mouse pointer between the given event and the previous mousemove event. |
movementY | Returns the difference in the Y coordinate of the mouse pointer between the given event and the previous mousemove event. |
offsetX | Returns the x-coordinate (horizontal-coordinate) of the mouse pointer, relative to the target element. |
offsetY | Returns the y-coordinate (vertical-coordinate) of the mouse pointer, relative to the target element. |
pageX | Returns the horizontal coordinate of the mouse pointer in pixels of the event relative to the whole document. |
pageY | Returns the vertical coordinate of the mouse pointer in pixels of the event relative to the whole document. |
screenX | Returns the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates. |
screenY | Returns the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates. |
shiftKey | Indicates whether the shift key was pressed or not when a given mouse event occurs. |
relatedTarget | Returns 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.