aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/event/bubbles
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/event/bubbles
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/event/bubbles')
-rw-r--r--files/zh-cn/web/api/event/bubbles/index.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/event/bubbles/index.html b/files/zh-cn/web/api/event/bubbles/index.html
new file mode 100644
index 0000000000..0d3c205003
--- /dev/null
+++ b/files/zh-cn/web/api/event/bubbles/index.html
@@ -0,0 +1,27 @@
+---
+title: event.bubbles
+slug: Web/API/Event/bubbles
+translation_of: Web/API/Event/bubbles
+---
+<p>{{ ApiRef() }}</p>
+<h3 id="Summary" name="Summary">概述</h3>
+<p>返回一个布尔值,表明当前事件是否会向DOM树上层元素冒泡.</p>
+<h3 id="语法">语法</h3>
+<pre><em>var bool</em> = event.bubbles;
+</pre>
+<h3 id="Notes" name="Notes">备注</h3>
+<p>一些特定的事件类型会冒泡.这时,该事件对象的<code>bubbles</code>属性为<code>true</code>. 你可以检查该属性的值来判断一个事件对象是否冒泡.</p>
+<h3 id="Example" name="Example">例子</h3>
+<pre class="brush: js"> function goInput(e) {
+ // 检查事件对象是否冒泡
+ if (!e.bubbles) {
+ // 如果不冒泡,则手动传递事件
+ passItOn(e);
+ }
+ // 如果冒泡的话
+ doOutput(e)
+}
+</pre>
+<h3 id="规范">规范</h3>
+<p><a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-event-bubbles" title="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-event-bubbles">event.bubbles</a></p>
+<p>{{ languages( { "es": "es/DOM/event.bubbles", "ja": "ja/DOM/event.bubbles", "pl": "pl/DOM/event.bubbles" , "zh-cn": "zh-cn/DOM/event.bubbles" } ) }}</p>