HTML | onmouseup Event Attribute
This attribute fires when a mouse button is released over the element. The order of events occur related to the onmouseup event.
- onmousedown
- onmouseup
- onclick
Syntax:
<element onmouseup = "script">
Attribute Value: This attribute contains single value script and it works when onmouseup attribute called.
Example:
<!DOCTYPE html> <html> <head> <title>onmouseup event attribute</title> <style> h1 { color:green; } body { text-align:center; } </style> </head> <body> <center> <h1>GeeksforGeeks</h1> <h2>onmouseup event attribute</h2> <p id="gfg" onmouseup="mouseUp()"> GeeksforGeeks: ! computer science portal for geeks </p> <script> function mouseUp() { document.getElementById("gfg").style.color = "green"; document.getElementById("gfg").style.fontSize = "20px"; } </script> </body> </html> |
chevron_right
filter_none
Output:
Before:

After:

Supported Browsers: The browser supported by onmouseup attribute are listed below:
- Chrome
- Internet Explorer
- Firefox
- Safari
- Opera
Recommended Posts:
- HTML | DOM onmouseup Event
- HTML | onoffline Event Attribute
- HTML | onfocus Event Attribute
- HTML | onpaste Event Attribute
- HTML | onwheel Event Attribute
- HTML | onmousemove Event Attribute
- HTML | oncontextmenu Event Attribute
- HTML | onselect Event Attribute
- HTML | onreset Event Attribute
- HTML | onkeydown Event Attribute
- HTML | ondragenter Event Attribute
- HTML | onmouseover Event Attribute
- HTML | onunload Event Attribute
- HTML | onsearch Event Attribute
- HTML | onhashchange Event Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



