<html>
<head>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>
</head>
<body>
<h1>JavaScript HTML Events</h1>
<h2>The ondblclick Attribute</h2>
<p ondblclick="myFunction()">Doubleclick this paragraph to trigger a function.</p>
<p id="demo"></p>
</body>
</html>