HTML onmouseup event attribute
Example
When the mouse button is released over a paragraph, execute JavaScript:
<p onmouseup="mouseUp()">Click the text!
Browser Support
IE | Firefox | Chrome | Safari | Opera |
---|---|---|---|---|
All major browsers support the onmouseup attribute.
Definition and Usage
The onmouseup attribute triggers when the mouse button is released.
Tip:Relative event order to onmouseup event (limited to left/right/middle mouse button):
- onmousedown
- onmouseup
- onclick
Event order of onmouseup event (limited to right mouse button):
- onmousedown
- onmouseup
- oncontextmenu
Note:The onmouseup attribute is not applicable to 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 Value
Value | Description |
---|---|
script | Script executed when onmouseup occurs. |