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

HTML Referenzhandbuch

HTML-Tag-Übersicht

HTML ondblclick-Ereignis-Attribut

Die ondblclick-Attribut wird verwendet, um den Ereignishandler für das aktuelle Elements dblclick-Ereignis zu erhalten oder zu setzen

HTML Event Attributes

Online-Beispiel

Ein Doppelklick mit der linken Maustaste auf das aktuelle Element löst das dblclick-Ereignis aus:

<!DOCTYPE html>
<html>
<head>
<title>ondblclick-Beispiel-Demonstration Basistutorialoldtoolbag.com</title>
</head>
<body>
<script>
function showAlert()
 {
 alert("Eine dblclick-Ereignis wurde erkannt!")
 }
</script>
<button auf Doppelklick="showAlert()">Klicken Sie mit der linken Maustaste doppelt auf mich</button>
<p>Double-clicking the element above will trigger the dblclick event.</p>
</body>
</html>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the ondblclick event attribute

Definition and Usage

The ondblclick attribute triggers 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 HTML5The Differences

None.

Syntax

<element ondblclick="script">

Attribute Value

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