English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
A propriedade ondblclick é usada para obter ou definir a função de manipulador de eventos do evento dblclick do elemento atual
Clique duas vezes no botão esquerdo do mouse no elemento atual para acionar o evento dblclick:
!DOCTYPE html> <html> <head> <title>Exemplo de ondblclick Demonstração Tutorial Básicooldtoolbag.com</title> </head> <body> <script> function showAlert() { alert("Detected dblclick event!") } </script> <button ondblclick="showAlert()">Clique com o botão esquerdo do mouse duas vezes em mim</button> <p>Double-clicking the element above will trigger the dblclick event.</p> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the ondblclick event attribute
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>.
None.
<element ondblclick="script">
Value | Description |
---|---|
script | Specifies the script to be executed when the ondblclick event is triggered. |