UiEvent detail Property
Example
Find out how many times the mouse was clicked in the same area:
var x = event.detail;
Try it Yourself »
Definition and Usage
The detail property returns a number with details about the event.
When used on onclick and ondblclick, the number indicates the current click count.
When used on onmousedown and onmouseup,the number indicates the current click count plus 1.
Note: This property is read-only.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
detail | Yes | 9.0 | Yes | Yes | Yes |
Syntax
event.detail
Technical Details
Return Value: |
A Number, representing the number of clicks that happened in a short amount of time. Note: The returned value for a ondblclick event is always "2" Note: The returned value for a onmouseover or onmouseout event is always "0" |
---|---|
DOM Version: | DOM Level 2 Events |
❮ Event Object