Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. Web API
  3. Element
  4. compositionupdate

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

View in EnglishAlways switch to English

compositionupdate

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.

compositionupdate 事件触发于字符被输入到一段文字的时候(这些可见字符的输入可能需要一连串的键盘操作、语音识别或者点击输入法的备选词)

BubblesYes
CancelableNo
Target objectsElement
InterfaceTouchEvent

属性

PropertyTypeDescription
target只读EventTarget焦点所在的,处理文字输入的元素。
type只读DOMStringThe type of event.
bubbles只读booleanDoes the event normally bubble?
cancelable只读booleanIs it possible to cancel the event?
view只读WindowProxyDocument.defaultView (thewindow of the document).
detail只读long (float)0.
data只读DOMString (string)要被替换掉的字符串,如果输入时没有字符串被选,则为空字符串。只读。
locale只读DOMString (string)输入事件的语言代号,或者空字符串。只读。

规范

Specification
UI Events
# event-type-compositionupdate

浏览器兼容性

参阅

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp