English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

SQL tutorial

Redis tutorial

HTML: <!

...

HTML Event Attributes

> comment tags

> – <h

> tag
: <keygen> tag
: <mark> tag
: <progress> tag3HTML ondblclick event attribute/The ondblclick attribute is used to get or set the event handler function for the dblclick event of the current element
</Online Example
Double-clicking the left mouse button on the current element triggers the dblclick event:
Example
<!DOCTYPE html>
 <html>
 </head>
 </body>
</</script>
<button ondblclick="showAlert()">Double-click me with the left mouse button</button>
<p>Double-clicking the element above will trigger the dblclick event.</p>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the ondblclick event attribute

Definition and Usage

The ondblclick attribute is triggered when the mouse double-clicks on an element.

Note: The ondblclick attribute cannot be used with the following functions: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.

HTML 4.01 With HTML5Differences

None.

Syntax

<element ondblclick="script">

Attribute Value

ValueDescription
scriptSpecifies the script to be executed when the ondblclick event is triggered.
HTML Event Attributes