HTML onmouseupEvent Attribute
Examples
Run the script when the mouse button is released:
<p onmouseup="mouseUp()">Click the text!</p>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the onmouseup event attribute.
Definition and Usage
The onmouseup attribute is triggered when the user releases a mouse button.
Tip:Order of events related to the onmouseup event (left/middle mouse button):
- onmousedown
- onmouseup
- onclick
Order of events related to the onmouseup event (right mouse button):
- onmousedown
- onmouseup
- oncontextmenu
Note:The onmouseup attribute cannot be used on the following elements: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.
Differences between HTML 4.01 and HTML5
None.
Syntax
<element onmouseup="script">
Attribute Values
| Value | Description |
|---|---|
| script | Specifies the script to be executed when the onmouseup event is triggered. |
HTML Event Attributes Other Extensions