UiEvent detail property

Definition and usage

The detail property returns a numeric value that contains detailed information about the event.

Used with onclick and ondblclick, the number represents the current click count.

Used with onmousedown and onmouseup, the number represents the current click count plus 1.

Note:This property is read-only.

Example

Determine the number of times the mouse has been clicked in the same area:

var x = event.detail;

Try it yourself

Syntax

event.detail

Technical details

Return value:

Digital value representing the number of clicks that occur in a short period of time.

Note:The return value of the ondblclick event is always "2".

Note:The return value of the onmouseover or onmouseout event is always "0".

DOM Version: DOM Level 2 Events

Browser Support

The numbers in the table indicate the first browser version that fully supports the property.

Properties Chrome IE Firefox Safari Opera
detail Support 9.0 Support Support Support