diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/uievent/cancelbubble | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/uievent/cancelbubble')
-rw-r--r-- | files/zh-cn/web/api/uievent/cancelbubble/index.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/uievent/cancelbubble/index.html b/files/zh-cn/web/api/uievent/cancelbubble/index.html new file mode 100644 index 0000000000..cc024ba8b6 --- /dev/null +++ b/files/zh-cn/web/api/uievent/cancelbubble/index.html @@ -0,0 +1,18 @@ +--- +title: event.cancelBubble +slug: Web/API/UIEvent/cancelBubble +translation_of: Web/API/UIEvent/cancelBubble +--- +<p>{{ ApiRef() }}</p> +<div class="warning"> + <strong>警告:</strong> 请使用 <a href="/zh-cn/DOM/event.stopPropagation" title="zh-cn/DOM/event.stopPropagation">event.stopPropagation()</a> 方法来代替该不标准的属性.</div> +<h3 id="Summary" name="Summary">概述</h3> +<p>{{ Deprecated_header() }} 获取或设置一个布尔值,表明当前事件是否要取消冒泡.</p> +<h3 id="Syntax" name="Syntax">语法</h3> +<pre class="eval">event.cancelBubble = <em>bool;</em> +<em>var bool</em> = event.cancelBubble; +</pre> +<p><code>bool</code> 的值为<code>true或</code><code>false</code>.</p> +<h3 id="Notes" name="Notes">备注</h3> +<p><code>如果一个事件是可冒泡的,则它的cancelBubble</code>属性的默认值为 <code>false</code>,代表允许该事件向上冒泡. 将<code>cancelBubble</code>属性设置为<code>true以后,可以阻止该事件的进一步冒泡行为.</code></p> +<p>{{ languages( { "pl": "pl/DOM/event.cancelBubble" ,"en": "en/DOM/event.cancelBubble" } ) }}</p> |