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.
Supported Tags: It supports All HTML elements, EXCEPT:
- <base>
- <bdo>
- <br>
- <head>
- <html>
- <iframe>
- <meta>
- <param>
- <script>
- <style>
- <title>
Syntax:
Hey geek! The constant emerging technologies in the world of web development always keeps the excitement for this subject through the roof. But before you tackle the big projects, we suggest you start by learning the basics. Kickstart your web development journey by learning JS concepts with our JavaScript Course. Now at it's lowest price ever!
<element ondblclick="script">
Elements: This method can have following attributes:
- <script>
Attribute: The script to be run on ondblclick event Attribute.
Example:
html
<!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> |
Output:

Supported Browsers: The browser supported by ondblclick Event Attribute are listed below:
- Apple Safari
- Google Chrome
- Firefox
- Opera
- Internet Explorer

