HTML | DOM MouseEvent
Events that occur when the mouse interacts with the HTML document falls under the category of MouseEvent property.
- onclick: The event occurs when the user clicks on an element.
- onmousedown: The event occurs when the button pressed over an element.
- onmouseenter: The event occurs when the pointer is moved onto an element.
- onmouseout: The event occurs when a user moves the mouse pointer out of an element, or out of one of its children.
- onmouseup: The event occurs when a user releases a mouse button over an element.
- oncontextmenu: This event occurs on right-click on an element.
- ondblclick: This event occurs on double-click on an element.
- onmouseleave: When pointer is moved out of an element.
- onmousemove: This event occurs while pointer move over element.
- onmouseover: This event occurs when the pointer move over an element, or its children.
- onmouseup property:
- onmousedown property:
- onclick property:
- oncontextmenu property:
- ondblclick property:
- onmouseenter property:
- onmouseleave property:
- onmousemove property:
- onmouseout property:
- onmouseover property:
Example-1: Below program illustrate onmousedown and onmouseup property.
- Google Chrome
- Mozilla Firefox