Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ondblclick event

ondblclick event

Event Object Reference Event Object

Example

Execute JavaScript code when an element is double-clicked:

Click me

Try it »


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 be executed when the event occurs.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the ondblclick event


HTML tags that support this event:

The ondblclick attribute can be used on HTML elements, except: , ,
, , ,