Latest web development tutorials
 

MouseEvent detail Property

< Event Object

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 that indicates how many times the mouse was clicked in the same area, for a short amount of time.

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