js double click event code example
Example 1: javascript on double click
document.getElementById("myBtn").addEventListener("dblclick", function() {
alert("Hello World!");
});
Example 2: double click on element using javascript
document.getElementById("something").dblclick();
Example 3: javascript listen for double click
const div = document.querySelector('div');
div.addEventListener('dblclick', () => {
alert('You just double clicked the div!');
});