A function is triggered when the button is double-clicked. The function outputs some text in a p element with id="demo".
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<button ondblclick="myFunction()">Double-click me</button>
<p id="demo"></p>
<p>A function is triggered when the button is double-clicked. The function outputs some text in a p element with id="demo".</p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>
</body>
</html>
Example of HTML ondblclick Event Attribute | Mouse Events Attribute |
Definition and Usage of HTML ondblclick Event Attribute | Mouse Events Attribute |
Browser Support of HTML ondblclick Event Attribute | Mouse Events Attribute |
Syntax of HTML ondblclick Event Attribute | Mouse Events Attribute |
Attribute Values of HTML ondblclick Event Attribute | Mouse Events Attribute |
Technical Details of HTML ondblclick Event Attribute | Mouse Events Attribute |
How to Execute a JavaScript when a button is double-clicked | Mouse Events Attribute |
How to Double-click on a <p> element to change its text color to red | Mouse Events Attribute |
How to Double-click on a button to copy some text from an input field to another input field | Mouse Events Attribute |
List of Mouse Events Attribute | Mouse Events Attribute |
What is HTML onclick Event Attribute | Mouse Events Attribute |
What is HTML ondblclick Event Attribute | Mouse Events Attribute |
What is HTML onmousedown Event Attribute | Mouse Events Attribute |
What is HTML onmousemove Event Attribute | Mouse Events Attribute |
Type: | Html |
Category: | Web Tutorial |
Sub Category: | Mouse Events Attribute |
Uploaded by: | Admin |