ondblclickEvent
Example
Execute JavaScript code when an element is double-clicked:
<p ondblclick="myFunction()">Click me</p>
Try it yourself »
Definition and Usage
The ondblclick event occurs when an object is double-clicked.
Syntax
In HTML:
<element
ondblclick="SomeJavaScriptCode">
In JavaScript:
object.ondblclick=function(){SomeJavaScriptCode};
| Parameters | Description |
|---|---|
| SomeJavaScriptCode | Required. Specifies the JavaScript to execute when the event occurs. |
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the ondblclick event
HTML tags that support this event:
The ondblclick attribute can be used on all HTML elements, except: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>.
Event Object Other Extensions