Use the ondblclick event to generate an event on double click.
Example
You can try to run the following code to learn how to work with ondblclick event in JavaScript −
<html>
<head>
<script>
<!--
function sayHello() {
alert("Hello World")
}
//-->
</script>
</head>
<body>
<p ondblclick="sayHello()">Double Click me</p>
</body>
</html>