Open In App
Related Articles

HTML | onmouseup Event Attribute

Improve Article
Save Article
Like Article

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 {
            color: green;
        body {
            text-align: center;
        <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 2
  • Edge 12
  • Internet Explorer 9
  • Firefox 6
  • Safari 4
  • Opera 11.6 

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 18 Aug, 2022
Like Article
Save Article
Similar Reads
Related Tutorials