HTML 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:green;font-style:italic;">GeeksForGeeks</h1> <h2 style="color:green;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 = "Geeks For Geeks"; } </script> </body> </html> |
chevron_right
filter_none
Output:

Supported Browsers: The browser supported by ondblclick Event Attribute are listed below:
- Apple Safari
- Google Chrome
- Firefox
- Opera
- Internet Explorer
Recommended Posts:
- HTML | onbeforeunload Event Attribute
- HTML | onselect Event Attribute
- HTML | onerror Event Attribute
- HTML | ondragend Event Attribute
- HTML | onfocus Event Attribute
- HTML | onafterprint Event Attribute
- HTML | ondragleave Event Attribute
- HTML | onbeforeprint Event Attribute
- HTML | onhashchange Event Attribute
- HTML | onoffline Event Attribute
- HTML | onresize Event Attribute
- HTML | ondrag Event Attribute
- HTML | ontoggle Event Attribute
- HTML | onreset Event Attribute
- HTML | onunload Event Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



