Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | DOM onmouseup Event

  • Last Updated : 04 Aug, 2021

The HTML DOM onmouseup event occurs on release of a pressed button on a mouse over an element.
Related events for left-click: 

  • onmousedown
  • onmouseup
  • onclick

Related events for right-click: 

  • onmousedown
  • onmouseup
  • oncontextmenu

Supported Tags: It supports All HTML elements, EXCEPT:

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


  • In HTML: 
<element onmouseup="myScript">
  • In JavaScript: 
object.onmouseup = function(){myScript};
  • In JavaScript, using the addEventListener() method: 
object.addEventListener("mouseup", myScript);



<!DOCTYPE html>
      HTML DOM onmousedown Event
        <h1 style="color:green">
        <h2 id="try">
          HTML DOM onmousedown Event
              "mousedown", btnpressed);
              "mouseup", btnup);
            function btnpressed() {
                  "try").innerHTML = "Button Pressed.";
            function btnup() {
                  "try").innerHTML = "Button Released.";


Supported Browsers: The browsers supported by HTML DOM onmouseup Event are listed below: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!