Element: mouseup event
UI Events
UI Events
The **`mouseup`** event is fired at an Element when a button on a pointing device (such as a mouse or trackpad) is released while the pointer is located inside it.
`mouseup` events are the counterpoint to mousedown events.
This behavior is different from pointerup events. When using a physical mouse, `mouseup` events fire whenever any button on a mouse is released. `pointerup` events fire only upon the last button release; previous button releases, while other buttons are held down, don't fire `pointerup` events.
## Syntax
Use the event name in addEventListener():
```js-nolint
addEventListener("mouseup", (event) => { })
```
Alternatively, assign to the [event handler property](/docs/Web/API/Document_Object_Model/Events#using_onevent_properties) of the interface:
```js-nolint
onmouseup = (event) => { }
```
## Event type
A MouseEvent. Inherits from UIEvent and Event.
MouseEvent
## Examples
See [`mousemove` event](/docs/Web/API/Element/mousemove_event#examples) for example code.
## Specifications
## Browser compatibility
## See also
- [Learn: Introduction to events](/docs/Learn_web_development/Core/Scripting/Events)
- mousedown
- mousemove
- click
- dblclick
- mouseover
- mouseout
- mouseenter
- mouseleave
- contextmenu
- pointerup
Cite this
"Element: mouseup event". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseup_event JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy