The UiEvent detail property is used for returning a number with details about an event.
The UiEvent detail property returns number which indicates the current click count when used on onclick and ondblclick whereas when used on onmousedown and onmouseup, it returns a number which indicates the current click count plus 1.
Below program illustrates the UiEvent detail property :
Example: Finding out how many times the mouse was clicked in the same area.
Before clicking the button:
After clicking the button:
- Internet Explorer
- Google Chrome
- Apple Safari