Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | onmouseup Event Attribute

  • Difficulty Level : Basic
  • Last Updated : 02 Aug, 2021

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

Supported Tags: All HTML elements, EXCEPT: 

  • <base>
  •  <bdo>
  • <br>
  • <head>
  • <html>
  • <iframe>
  • <meta>
  • <param>
  • <script>
  • <style>
  •  <title>


<element onmouseup = "script">

Attribute Value: This attribute contains single value script and it works when onmouseup attribute called.


<!DOCTYPE html>
        <title>onmouseup event attribute</title>
            h1 {
            body {
        <h2>onmouseup event attribute</h2>
        <p id="gfg" onmouseup="mouseUp()">
        GeeksforGeeks: ! computer science portal for geeks
            function mouseUp() {
                document.getElementById("gfg").style.color = "green";
                document.getElementById("gfg").style.fontSize = "20px";



Supported Browsers: The browser supported by onmouseup attribute are listed below: 

  • Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!