• Skip to main content
  • Skip to search
  • Skip to select language

Learn front-end development with high quality, interactive courses from Scrimba. Enroll now!

MDN Web Docs
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Accessibility

      Build web projects usable for all

    • Web Technology

      Web technology reference for developers

  • Learn
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Plus
    • Overview

      A customized MDN experience

    • AI Help

      Get real-time assistance and support

    • Updates

      All browser compatibility updates at a glance

    • Documentation

      Learn how to use MDN Plus

    • FAQ

      Frequently asked questions about MDN Plus

  • Curriculum New
  • Blog
    • Playground

      Write, test and share your code

    • HTTP Observatory

      Scan a website for free

    • AI Help

      Get real-time assistance and support

  1. 面向开发者的 Web 技术
  2. Web API
  3. UIEvent
  4. UIEvent.detail
    • Is this useful?
    • English (US)
    • Deutsch
    • Français
    • 日本語
    • 한국어

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

在本文中

  • Specifications
  • Browser compatibility
  1. UI Events
  2. UIEvent
  3. 构造函数
    1. UIEvent()
  4. 实例属性
    1. detail
    2. sourceCapabilities 实验性
    3. view
    4. which 已弃用
  5. 实例方法
    1. initUIEvent() 已弃用
  6. 继承
    1. Event
  7. UI Events 的相关页面
    1. CompositionEvent
    2. FocusEvent
    3. InputEvent
    4. KeyboardEvent
    5. MouseEvent
    6. MouseScrollEvent 非标准 已弃用
    7. MutationEvent 非标准 已弃用
    8. TextEvent 已弃用
    9. WheelEvent

在本文中

  • Specifications
  • Browser compatibility

UIEvent.detail

UIEvent.detail 是只读属性,当值为非空的时候,提供当前点击数 (和环境有关) 。

对 click 或者 dblclick 事件,UIEvent.detail 是当前点击数量。

对 mousedown 或者 mouseup 事件,UIEvent.detail 是 1 加上当前点击数。

对所有的其他UIEvent 对象,UIEvent.detail 总是零。

Specifications

Specification
UI Events
# dom-uievent-detail

Browser compatibility

Help improve MDN

Learn how to contribute.

This page was last modified on 2024年4月23日 by MDN contributors.

View this page on GitHub • Report a problem with this content
MDN logo

Your blueprint for a better internet.

  • MDN on Bluesky
  • MDN on Mastodon
  • MDN on X (formerly Twitter)
  • MDN on GitHub
  • MDN Blog RSS Feed

MDN

  • About
  • Blog
  • Careers
  • Advertise with us

Support

  • Product help
  • Report an issue

Our communities

  • MDN Community
  • MDN Forum
  • MDN Chat

Developers

  • Web Technologies
  • Learn Web Development
  • MDN Plus
  • Hacks Blog
  • Website Privacy Notice
  • Cookies
  • Legal
  • Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2025 by individual mozilla.org contributors. Content available under a Creative Commons license.