Skip to content
Related Articles

Related Articles

Improve Article

HTML | ondblclick Event Attribute

  • Difficulty Level : Basic
  • Last Updated : 13 Jun, 2019

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


<element ondblclick="script"> 

Elements: This method can have following attributes:

  • <script>

Attribute: The script to be run on ondblclick event Attribute.


<!DOCTYPE html>
<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>
function Geeks() {
    document.getElementById("sudo").innerHTML = "Geeks For Geeks";


Supported Browsers: The browser supported by ondblclick Event Attribute are listed below:

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

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :