document.getElementById("myBtn").addEventListener("dblclick", function() { alert("Hello World!"); });