HTML ondblclick Event Attribute

admin_img Posted By Bajarangi soft , Posted On 08-10-2020

This Attribute Event occurs when a user fires mouse Double click on the Element. It is a part of Event Attribute.

ondblclick Event Attribute

This Attribute Event occurs when a user fires mouse Double click on the Element. It is a part of Event Attribute.
Syntax:

<element ondblclick="script"> 

Elements: This method can have following attributes:

  • <script>
Attribute: The script to be run on ondblclick event Attribute.
Example:
<!DOCTYPE html>
<html>
<body>
<center>
    <h1 style="color:darkred;font-style:italic;">Bajarangi Soft</h1>
    <h2 style="color:darkred;font-style:italic;">odblclick Event Attribute</h2>
    <button ondblclick="Geeks()">Double-click me</button>

    <p id="sudo"></p>

    <script>
        function Geeks() {
            document.getElementById("sudo").innerHTML = "Bajarangi Soft";
        }
    </script>

</body>
</html>

 

Related Post