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 |
HTML onclick Event Attribute | Mouse Events Attribute |
HTML ondblclick Event Attribute | Mouse Events Attribute |
HTML onmousedown Event Attribute | Mouse Events Attribute |
HTML onmousemove Event Attribute | Mouse Events Attribute |
HTML onmouseout Event Attribute | Mouse Events Attribute |
HTML onmouseover Event Attribute | Mouse Events Attribute |
HTML onmouseup Event Attribute | Mouse Events Attribute |
HTML onwheel Event Attribute | Mouse Events Attribute |
Type: | html |
Category: | Web Tutorial |
Sub Category: | Mouse Events Attribute |
Uploaded by: | Admin |