blob: 1d9c95f17518e486cf9f88e19f40a4210083301e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
---
title: compositionupdate
slug: Web/API/Element/compositionupdate_event
translation_of: Web/API/Element/compositionupdate_event
original_slug: Web/Events/compositionupdate
---
<p><strong><code>compositionupdate</code></strong> 事件触发于字符被输入到一段文字的时候(这些可见字符的输入可能需要一连串的键盘操作、语音识别或者点击输入法的备选词)</p>
<table class="properties">
<tbody>
<tr>
<td>Bubbles</td>
<td>Yes</td>
</tr>
<tr>
<td>Cancelable</td>
<td>No</td>
</tr>
<tr>
<td>Target objects</td>
<td>{{domxref("Element")}}</td>
</tr>
<tr>
<td>Interface</td>
<td>{{domxref("TouchEvent")}}</td>
</tr>
</tbody>
</table>
<h2 id="属性">属性</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Property</th>
<th scope="col">Type</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>target</code> {{ReadOnlyInline}}</td>
<td>{{domxref("EventTarget")}}</td>
<td>焦点所在的,处理文字输入的元素。</td>
</tr>
<tr>
<td><code>type</code> {{ReadOnlyInline}}</td>
<td>{{domxref("DOMString")}}</td>
<td>The type of event.</td>
</tr>
<tr>
<td><code>bubbles</code> {{ReadOnlyInline}}</td>
<td><code>boolean</code></td>
<td>Does the event normally bubble?</td>
</tr>
<tr>
<td><code>cancelable</code> {{ReadOnlyInline}}</td>
<td><code>boolean</code></td>
<td>Is it possible to cancel the event?</td>
</tr>
<tr>
<td><code>view</code> {{ReadOnlyInline}}</td>
<td>{{domxref("WindowProxy")}}</td>
<td>{{domxref("Document.defaultView")}} (the <code>window</code> of the document).</td>
</tr>
<tr>
<td><code>detail</code> {{ReadOnlyInline}}</td>
<td><code>long</code> (<code>float</code>)</td>
<td>0.</td>
</tr>
<tr>
<td><code>data </code>{{ReadOnlyInline}}</td>
<td>{{domxref("DOMString")}} (string)</td>
<td>要被替换掉的字符串,如果输入时没有字符串被选,则为空字符串。只读。</td>
</tr>
<tr>
<td><code>locale </code>{{ReadOnlyInline}}</td>
<td>{{domxref("DOMString")}} (string)</td>
<td>输入事件的语言代号,或者空字符串。只读。</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
{{Compat("api.Element.compositionupdate_event")}}
<h2 id="参阅">参阅</h2>
<ul>
<li>{{Event("compositionstart")}}</li>
<li>{{Event("compositionupdate")}}</li>
<li>{{Event("compositionend")}}</li>
</ul>
|