A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-onmouseup-event-attribute/ below:

HTML | onmouseup Event Attribute

HTML | onmouseup Event Attribute

Last Updated : 18 Aug, 2022

This attribute fires when a mouse button is released over the element. The order of events occur related to the onmouseup event. 

Supported Tags: All HTML elements, EXCEPT: 

Syntax: 

<element onmouseup = "script">

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

HTML
<!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>
    </center>
</body>
</html>

Output: 
Before: 

After: 

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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4