UIEvent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count.

For click or dblclick events, UIEvent.detail is the current click count.

For mousedown or mouseup events, UIEvent.detail is 1 plus the current click count.

对于所有其它 UIEvent 对象, UIEvent.detail is always zero.

规范

规范 状态 注释
DOM (文档对象模型) 3 级事件规范
The definition of 'UIEvent.detail' in that specification.
过时
DOM (文档对象模型) 2 级事件规范
The definition of 'UIEvent.detail' in that specification.
过时 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
detail Chrome Yes Edge 12 Firefox Yes IE 部分支持 9
部分支持 9
Always 0 on click and dblclick events. On mousedown and mouseup events, the count is not unique to the element, but is rather the global click count for the current document -- even across refreshes.
Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes

图例

完整支持

完整支持

部分支持

部分支持

见实现注意事项。

元数据

  • 最后修改: