diff options
Diffstat (limited to 'files/zh-cn/web/api/element')
38 files changed, 38 insertions, 2211 deletions
diff --git a/files/zh-cn/web/api/element/animate/index.html b/files/zh-cn/web/api/element/animate/index.html index aa5efc7d61..e0f7bfa2ac 100644 --- a/files/zh-cn/web/api/element/animate/index.html +++ b/files/zh-cn/web/api/element/animate/index.html @@ -100,101 +100,7 @@ translation_of: Web/API/Element/animate <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome("36")}}</td> - <td>{{CompatNo}}</td> - <td>{{ CompatGeckoDesktop("48.0")}}</td> - <td>{{CompatNo}}</td> - <td>23</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td><code>id</code> option</td> - <td>{{CompatChrome(50.0)}}</td> - <td>{{CompatNo}}</td> - <td>{{ CompatGeckoDesktop("48.0")}}</td> - <td>{{CompatNo}}</td> - <td>37</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td><code>composite</code>, <code>iterationComposite</code>, and <code>spacing</code> options</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatChrome(39.0)}}</td> - <td>{{CompatChrome(39.0)}}</td> - <td>{{ CompatGeckoMobile("48.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td><code>id</code> option</td> - <td>{{CompatNo}}</td> - <td>{{CompatChrome(50.0)}}</td> - <td>{{CompatChrome(50.0)}}</td> - <td>{{ CompatGeckoMobile("48.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td><code>composite</code>, <code>iterationComposite</code>, and <code>spacing</code> options</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.animate")}} <h2 id="更多">更多</h2> diff --git a/files/zh-cn/web/api/element/assignedslot/index.html b/files/zh-cn/web/api/element/assignedslot/index.html index b4c9b08de7..52bfea54dd 100644 --- a/files/zh-cn/web/api/element/assignedslot/index.html +++ b/files/zh-cn/web/api/element/assignedslot/index.html @@ -35,56 +35,4 @@ translation_of_original: Web/API/Element/assignedSlot <h2 id="Browser_Compatibility">Browser Compatibility</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(53.0)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Android Webview</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome for Android</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatNo}}</td> - <td>{{CompatChrome(53.0)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatChrome(53.0)}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.assignedSlot")}} diff --git a/files/zh-cn/web/api/element/before/index.html b/files/zh-cn/web/api/element/before/index.html index 11553a0194..36a69ffd98 100644 --- a/files/zh-cn/web/api/element/before/index.html +++ b/files/zh-cn/web/api/element/before/index.html @@ -129,57 +129,7 @@ console.log(parent.outerHTML); <h2 id="Browser_compatibility">Browser compatibility</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(54.0)}}</td> - <td>{{CompatGeckoDesktop(49)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatOpera(39)}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Android Webview</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome for Android</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatNo}}</td> - <td>{{CompatChrome(54.0)}}</td> - <td>{{CompatGeckoMobile(49)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatOpera(39)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatChrome(54.0)}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.before")}} <h2 id="See_also">See also</h2> diff --git a/files/zh-cn/web/api/element/blur_event/index.html b/files/zh-cn/web/api/element/blur_event/index.html index a072ec452b..78ed632783 100644 --- a/files/zh-cn/web/api/element/blur_event/index.html +++ b/files/zh-cn/web/api/element/blur_event/index.html @@ -89,57 +89,7 @@ form.addEventListener("blur", function( event ) { <h2 id="浏览器兼容性">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>5</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>6</td> - <td>12.1</td> - <td>5.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>4.0</td> - <td>53</td> - <td>{{CompatUnknown}}</td> - <td>10.0</td> - <td>12.1</td> - <td>5.1</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 在 Gecko 24 {{geckoRelease(24)}} 之前,事件的接口为 {{domxref("Event")}},而不是 {{domxref("FocusEvent")}}。参考 ({{bug(855741)}}).</p> +{{Compat("api.Element.blur_event")}} <h2 id="相关的事件">相关的事件</h2> diff --git a/files/zh-cn/web/api/element/childelementcount/index.html b/files/zh-cn/web/api/element/childelementcount/index.html index 93c5534455..9e247c9009 100644 --- a/files/zh-cn/web/api/element/childelementcount/index.html +++ b/files/zh-cn/web/api/element/childelementcount/index.html @@ -93,53 +93,7 @@ if (foo.childElementCount > 0) { <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatGeckoDesktop("3") }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>9.0</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>?</td> - <td>?</td> - <td>?</td> - <td>?</td> - <td>?</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.childElementCount")}} <h2 id="Specification" name="Specification">规范</h2> diff --git a/files/zh-cn/web/api/element/children/index.html b/files/zh-cn/web/api/element/children/index.html index 9690827104..eeab92baf5 100644 --- a/files/zh-cn/web/api/element/children/index.html +++ b/files/zh-cn/web/api/element/children/index.html @@ -63,55 +63,7 @@ if (parg.childElementCount) <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>1</td> - <td>3.5</td> - <td>9 (IE6-8 incl commend nodes)</td> - <td>10</td> - <td>4</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}<span style="font-size: 14px; line-height: 1.5;"></span></td> - </tr> - </tbody> -</table> -</div> - -<p style="margin-bottom: 20px; line-height: 30px;">[1] Internet Explorer 6 - 8 支持该属性,但是可能会错误地包含注释 {{domxref("Comment")}} 节点。</p> +{{Compat("api.Element.children")}} <h2 id="相关链接" style="margin-bottom: 20px; line-height: 30px;">相关链接</h2> diff --git a/files/zh-cn/web/api/element/classname/index.html b/files/zh-cn/web/api/element/classname/index.html index 0b071645e3..27234c0a75 100644 --- a/files/zh-cn/web/api/element/classname/index.html +++ b/files/zh-cn/web/api/element/classname/index.html @@ -69,55 +69,7 @@ if (elm.className == "fixed") { <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<table> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> - -<table> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> +{{Compat("api.Element.className")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/element/click_event/index.html b/files/zh-cn/web/api/element/click_event/index.html index f628e9e6cc..6cbda179ed 100644 --- a/files/zh-cn/web/api/element/click_event/index.html +++ b/files/zh-cn/web/api/element/click_event/index.html @@ -186,72 +186,7 @@ translation_of: Web/API/Element/click_event <li>这份清单并不完整,你可以帮助MDN做扩展</li> </ul> -<p>{{CompatibilityTable}}</p> - -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Edge</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}<sup>[2]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> - -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> - -<p>[1]只在{{HTMLElement("textarea")}} 以及某些{{HTMLElement("input")}} 元素上有效.</p> - -<p>[2] Internet Explorer 只在{{HTMLElement("input")}}的<code>checkbox</code>或<code>radio</code>元素双击时才会引发<code>click</code>事件.</p> +{{Compat("api.Element.click_event")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/element/compositionend_event/index.html b/files/zh-cn/web/api/element/compositionend_event/index.html index a6f99fdb23..07c5ac2746 100644 --- a/files/zh-cn/web/api/element/compositionend_event/index.html +++ b/files/zh-cn/web/api/element/compositionend_event/index.html @@ -85,59 +85,7 @@ original_slug: Web/Events/compositionend <h2 id="Browser_compatibility">Browser compatibility</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("9.0")}}<sup>[1]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("9.0")}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 该事件是在9.0 之前的Gecko版本中已经可以使用, 但没有 DOM 级3属性和方法。Gecko还不支持给受信任事件的locale属性设置值。但是, 当创建不受信任的事件时,此值可以通过<code>initCompositionEvent()</code> 设置。</p> +{{Compat("api.Element.compositionend_event")}} <h2 id="Related_events">Related events</h2> diff --git a/files/zh-cn/web/api/element/compositionupdate_event/index.html b/files/zh-cn/web/api/element/compositionupdate_event/index.html index af46b6cfdb..1d9c95f175 100644 --- a/files/zh-cn/web/api/element/compositionupdate_event/index.html +++ b/files/zh-cn/web/api/element/compositionupdate_event/index.html @@ -83,59 +83,7 @@ original_slug: Web/Events/compositionupdate <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatGeckoDesktop("9.0")}}<sup>[2]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("9.0")}}<sup>[2]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 在 <code>compositionstart</code> 事件之后不会立即执行。</p> - -<p>[2] <code>compositionupdate</code> 事件在编辑器里的内容改变之前就会触发。自从 Gecko 12.0 {{geckoRelease("12.0")}} 开始 <code>input</code> 事件在输入过程中、内容变化后就触发。使用它可以在输入过程中就获得新的内容。</p> - -<p>Gecko 在可信事件(trusted events)中还不支持 <code>locale</code> 属性。但是开发者可以在使用 <code>initCompositionEvent()</code> 创建不可信事件时指定一个值。</p> +{{Compat("api.Element.compositionupdate_event")}} <h2 id="参阅">参阅</h2> diff --git a/files/zh-cn/web/api/element/copy_event/index.html b/files/zh-cn/web/api/element/copy_event/index.html index 9c705e1de4..814f236e40 100644 --- a/files/zh-cn/web/api/element/copy_event/index.html +++ b/files/zh-cn/web/api/element/copy_event/index.html @@ -82,75 +82,7 @@ original_slug: Web/Events/copy <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - <tr> - <td><code>clipboardData</code></td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatGeckoDesktop(22) }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - <tr> - <td><code>clipboardData</code></td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatGeckoMobile(22) }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.copy_event")}} <h2 id="参见">参见</h2> diff --git a/files/zh-cn/web/api/element/cut_event/index.html b/files/zh-cn/web/api/element/cut_event/index.html index ea59997633..6792076fb9 100644 --- a/files/zh-cn/web/api/element/cut_event/index.html +++ b/files/zh-cn/web/api/element/cut_event/index.html @@ -74,78 +74,7 @@ original_slug: Web/Events/cut <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{compatChrome(58)}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{CompatOpera(45)}}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - <tr> - <td><code>clipboardData</code></td> - <td>{{compatChrome(58)}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatGeckoDesktop(22) }}</td> - <td>{{ CompatNo() }}</td> - <td>{{CompatOpera(45)}}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{compatChrome(58)}}</td> - <td>{{compatChrome(58)}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatOperaMobile(45)}}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - <tr> - <td><code>clipboardData</code></td> - <td>{{compatChrome(58)}}</td> - <td>{{compatChrome(58)}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatGeckoMobile(22) }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatOperaMobile(45)}}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.cut_event")}} <h2 id="相关">相关</h2> diff --git a/files/zh-cn/web/api/element/dblclick_event/index.html b/files/zh-cn/web/api/element/dblclick_event/index.html index b3244d8f64..cbd4e11148 100644 --- a/files/zh-cn/web/api/element/dblclick_event/index.html +++ b/files/zh-cn/web/api/element/dblclick_event/index.html @@ -135,77 +135,7 @@ translation_of: Web/API/Element/dblclick_event <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Edge</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1]只在{{HTMLElement("textarea")}} 以及某些{{HTMLElement("input")}} 元素上有效.</p> +{{Compat("api.Element.dblclick_event")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/element/dommousescroll_event/index.html b/files/zh-cn/web/api/element/dommousescroll_event/index.html index a68a7be558..8f0ffa23fd 100644 --- a/files/zh-cn/web/api/element/dommousescroll_event/index.html +++ b/files/zh-cn/web/api/element/dommousescroll_event/index.html @@ -46,53 +46,7 @@ translation_of: Web/API/Element/DOMMouseScroll_event <h2 id="Browser_compatibility">Browser compatibility</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatGeckoDesktop("1.0") }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatGeckoMobile("1.0") }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.DOMMouseScroll_event")}} <h2 id="See_also">See also</h2> diff --git a/files/zh-cn/web/api/element/focus_event/index.html b/files/zh-cn/web/api/element/focus_event/index.html index ff4ebf6447..53da6926ee 100644 --- a/files/zh-cn/web/api/element/focus_event/index.html +++ b/files/zh-cn/web/api/element/focus_event/index.html @@ -74,59 +74,7 @@ original_slug: Web/Events/focus <h2 id="浏览器兼容性">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Featrue</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatVersionUnknown()}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown()}}</td> - <td>{{CompatUnknown()}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown()}}</td> - <td>{{CompatUnknown()}}</td> - <td>{{CompatUnknown()}}</td> - <td>{{CompatUnknown()}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.focus_event")}} <h2 id="相关事件">相关事件</h2> diff --git a/files/zh-cn/web/api/element/focusout_event/index.html b/files/zh-cn/web/api/element/focusout_event/index.html index defd92146f..3696616839 100644 --- a/files/zh-cn/web/api/element/focusout_event/index.html +++ b/files/zh-cn/web/api/element/focusout_event/index.html @@ -64,57 +64,7 @@ original_slug: Web/Events/focusout <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop(52)}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile(52)}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.focusout_event")}} <h2 id="相关事件">相关事件</h2> diff --git a/files/zh-cn/web/api/element/getattribute/index.html b/files/zh-cn/web/api/element/getattribute/index.html index ed9673bde5..ce97f4a004 100644 --- a/files/zh-cn/web/api/element/getattribute/index.html +++ b/files/zh-cn/web/api/element/getattribute/index.html @@ -39,32 +39,7 @@ alert(align); <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<table> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>29</td> - <td>{{CompatVersionUnknown}}</td> - <td>23</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>6</td> - </tr> - </tbody> -</table> - -<p>{{DOMAttributeMethods}}</p> +{{Compat("api.Element.getAttribute")}} <h2 id="Specification" name="Specification">规范</h2> diff --git a/files/zh-cn/web/api/element/getattributenames/index.html b/files/zh-cn/web/api/element/getattributenames/index.html index d16ebf2b36..6a18abc1ab 100644 --- a/files/zh-cn/web/api/element/getattributenames/index.html +++ b/files/zh-cn/web/api/element/getattributenames/index.html @@ -45,54 +45,4 @@ for(let name of element.getAttributeNames()) <h2 id="浏览器兼容性">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(61)}}</td> - <td>{{CompatGeckoDesktop(45)}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatOpera(48)}}</td> - <td>{{CompatSafari(9)}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(61)}}</td> - <td>{{CompatChrome(61)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatOperaMobile(48)}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.getAttributeNames")}} diff --git a/files/zh-cn/web/api/element/getelementsbyclassname/index.html b/files/zh-cn/web/api/element/getelementsbyclassname/index.html index e8a2047b45..7fe78b7345 100644 --- a/files/zh-cn/web/api/element/getelementsbyclassname/index.html +++ b/files/zh-cn/web/api/element/getelementsbyclassname/index.html @@ -41,49 +41,4 @@ var testDivs = Array.prototype.filter.call(testElements, function(testElement){ </tbody> </table> <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }}</p> -<div id="compat-desktop"> - <table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }} [1]</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> - </table> -</div> -<div id="compat-mobile"> - <table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }} [1]</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> - </table> -</div> -<p>[1] Prior to Firefox 19, this method was returning a {{domxref("NodeList")}}; it was then changed to reflects the change in the spec.</p> +{{Compat("api.Element.getElementsByClassName")}} diff --git a/files/zh-cn/web/api/element/getelementsbytagname/index.html b/files/zh-cn/web/api/element/getelementsbytagname/index.html index 5f12087f21..1e5a152623 100644 --- a/files/zh-cn/web/api/element/getelementsbytagname/index.html +++ b/files/zh-cn/web/api/element/getelementsbytagname/index.html @@ -72,62 +72,4 @@ for (var i = 0; i < cells.length; i++) { <h2 id="Browser_Compatibility" name="Browser_Compatibility">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>1.0 [2]</td> - <td>{{ CompatVersionUnknown() }} [1]</td> - <td>5.5</td> - <td>{{ CompatVersionUnknown() }} [2]</td> - <td>{{ CompatVersionUnknown() }} [2]</td> - </tr> - <tr> - <td>getElementsByTagName("*")</td> - <td>1.0</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>6.0</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }} [1]</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Firefox 19之前的版本,该方法会返回一个 {{domxref("NodeList")}};之后根据规范进行了改变。</p> - -<p>[2] 最初,该方法会返回一个{{domxref("NodeList")}};之后根据规范进行了改变。</p> +{{Compat("api.Element.getElementsByTagName")}} diff --git a/files/zh-cn/web/api/element/getelementsbytagnamens/index.html b/files/zh-cn/web/api/element/getelementsbytagnamens/index.html index fdb01aef9f..bd91587ebe 100644 --- a/files/zh-cn/web/api/element/getelementsbytagnamens/index.html +++ b/files/zh-cn/web/api/element/getelementsbytagnamens/index.html @@ -60,69 +60,4 @@ for (var i = 0; i < cells.length; i++) { <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>1.0<sup>[1]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}<sup>[2]</sup></td> - <td>5.5</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - </tr> - <tr> - <td>getElementsByTagName("*")</td> - <td>1.0</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>6.0</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}<sup>[2]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Initially, this method was returning a {{domxref("NodeList")}}; it was then changed to reflects the spec change.</p> - -<p>[2] The behavior of <code>element.getElementsByTagNameNS</code> changed between Firefox 3.5 and Firefox 3.6. In Firefox 3.5 and before, this function would automatically case-fold any queries so that a search for "foo" would match "Foo" or "foo". In Firefox 3.6 and later this function is now case-sensitive so that a query for "foo" will only match "foo" and not "Foo". For more background on this, please see the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=542185#c5">comment from Henri Sivonen about the change</a>. You can also look at the <a href="/en-US/docs/Case_Sensitivity_in_class_and_id_Names" title="Case Sensitivity in class and id Names">relevant part of the standard, which states which parts of the API are case-sensitive and which parts aren't</a>.</p> - -<p>Prior to Firefox 19, this method was returning a {{domxref("NodeList")}}; it was then changed to reflects the spec change.</p> +{{Compat("api.Element.getElementsByTagNameNS")}} diff --git a/files/zh-cn/web/api/element/insertadjacentelement/index.html b/files/zh-cn/web/api/element/insertadjacentelement/index.html index da93a6ebb0..3c188fa7e8 100644 --- a/files/zh-cn/web/api/element/insertadjacentelement/index.html +++ b/files/zh-cn/web/api/element/insertadjacentelement/index.html @@ -106,53 +106,7 @@ afterBtn.addEventListener('click', function() { <h2 id="Browser_Compatibility" name="Browser_Compatibility">浏览器兼容</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatGeckoDesktop("48.0") }}</td> - <td>8</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatGeckoMobile("48.0") }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.insertAdjacentElement")}} <h2 id="参见">参见</h2> diff --git a/files/zh-cn/web/api/element/insertadjacenttext/index.html b/files/zh-cn/web/api/element/insertadjacenttext/index.html index 39d8af60fe..7a7076204c 100644 --- a/files/zh-cn/web/api/element/insertadjacenttext/index.html +++ b/files/zh-cn/web/api/element/insertadjacenttext/index.html @@ -95,53 +95,7 @@ afterBtn.addEventListener('click', function() { <h2 id="Browser_Compatibility" name="Browser_Compatibility">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatGeckoDesktop("48.0") }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatGeckoMobile("48.0") }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.insertAdjacentText")}} <h2 id="也可以看看">也可以看看</h2> diff --git a/files/zh-cn/web/api/element/localname/index.html b/files/zh-cn/web/api/element/localname/index.html index 5aed44e37b..60576640ff 100644 --- a/files/zh-cn/web/api/element/localname/index.html +++ b/files/zh-cn/web/api/element/localname/index.html @@ -86,55 +86,7 @@ translation_of: Web/API/Element/localName <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>46.0<sup>[1]</sup></td> - <td>{{CompatGeckoDesktop("48.0")}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("48.0")}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 此 API 之前在 {{domxref("Node")}} API.</p> +{{Compat("api.Element.localName")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/element/mousedown_event/index.html b/files/zh-cn/web/api/element/mousedown_event/index.html index fab356445a..5569ddf67a 100644 --- a/files/zh-cn/web/api/element/mousedown_event/index.html +++ b/files/zh-cn/web/api/element/mousedown_event/index.html @@ -147,77 +147,7 @@ translation_of: Web/API/Element/mousedown_event <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Edge</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1]只在{{HTMLElement("textarea")}} 以及某些{{HTMLElement("input")}} 元素上有效.</p> +{{Compat("api.Element.mousedown_event")}} <h2 id="参见">参见</h2> diff --git a/files/zh-cn/web/api/element/mouseenter_event/index.html b/files/zh-cn/web/api/element/mouseenter_event/index.html index f7f2026e73..f000e586f8 100644 --- a/files/zh-cn/web/api/element/mouseenter_event/index.html +++ b/files/zh-cn/web/api/element/mouseenter_event/index.html @@ -220,88 +220,7 @@ translation_of: Web/API/Element/mouseenter_event <h2 id="Browser_compatibility">Browser compatibility</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>30<sup>[1]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>10<sup>[2]</sup></td> - <td>5.5</td> - <td>{{CompatVersionUnknown}}<br> - {{CompatNo}} 15.0<br> - 17.0</td> - <td>7<sup>[3]</sup></td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoDesktop("44.0")}}<sup>[4]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Implemented in <a href="https://crbug.com/236215">bug 236215</a>.</p> - -<p>[2] Implemented in {{bug("432698")}}.</p> - -<p>[3] Safari 7 fires the event in many situations where it's not allowed to, making the whole event useless. See <a href="https://crbug.com/470258">bug 470258</a> for the description of the bug (it existed in old Chrome versions as well). Safari 8 has correct behavior</p> - -<p>[4] Implemented in {{bug("218093")}}.</p> +{{Compat("api.Element.mouseenter_event")}} <h2 id="See_also">See also</h2> diff --git a/files/zh-cn/web/api/element/mouseleave_event/index.html b/files/zh-cn/web/api/element/mouseleave_event/index.html index 4469085ca6..69455fb009 100644 --- a/files/zh-cn/web/api/element/mouseleave_event/index.html +++ b/files/zh-cn/web/api/element/mouseleave_event/index.html @@ -226,88 +226,7 @@ translation_of: Web/API/Element/mouseleave_event <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>30<sup>[1]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>10<sup>[2]</sup></td> - <td>5.5</td> - <td>{{CompatVersionUnknown}}<br> - {{CompatNo}} 15.0<br> - 17.0</td> - <td>7<sup>[3]</sup></td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoDesktop("44.0")}}<sup>[4]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>On disabled form elements</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 实现于 <a href="https://crbug.com/236215">bug 236215</a>.</p> - -<p>[2] 实现于{{bug("432698")}}.</p> - -<p>[3] Safari 7 会在许多不适当的情形下引发该事件,使得这个事件变得无用.详情参阅<a href="https://crbug.com/470258">bug 470258</a> (老版Chrome也有类似问题). Safari 8 已修正.</p> - -<p>[4] 实现于 {{bug("218093")}}.</p> +{{Compat("api.Element.mouseleave_event")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/element/mousewheel_event/index.html b/files/zh-cn/web/api/element/mousewheel_event/index.html index bd903b3be5..5f12a3c9a7 100644 --- a/files/zh-cn/web/api/element/mousewheel_event/index.html +++ b/files/zh-cn/web/api/element/mousewheel_event/index.html @@ -29,93 +29,7 @@ original_slug: Web/Events/mousewheel <h2 id="Browser_compatibility">Browser compatibility</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatChrome("1.0") }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatIE("6.0") }}</td> - <td>{{ CompatOpera("10.00") }}</td> - <td>{{ CompatSafari("3.0") }}</td> - </tr> - <tr> - <td><code>wheelDeltaX</code></td> - <td>{{ CompatChrome("1.0") }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatSafari("3.0") }}</td> - </tr> - <tr> - <td><code>wheelDeltaY</code></td> - <td>{{ CompatChrome("1.0") }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatSafari("3.0") }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - <tr> - <td><code>wheelDeltaX</code></td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - <tr> - <td><code>wheelDeltaY</code></td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.mousewheel_event")}} <h2 id="detail_value">detail value</h2> diff --git a/files/zh-cn/web/api/element/namespaceuri/index.html b/files/zh-cn/web/api/element/namespaceuri/index.html index 540f00e9c2..95e6a3d93d 100644 --- a/files/zh-cn/web/api/element/namespaceuri/index.html +++ b/files/zh-cn/web/api/element/namespaceuri/index.html @@ -55,55 +55,7 @@ translation_of: Web/API/Element/namespaceURI <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>46.0<sup>[1]</sup></td> - <td>{{CompatGeckoDesktop("48.0")}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("48.0")}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 这API 可以预先在 {{domxref("Node")}} API中获得.</p> +{{Compat("api.Element.namespaceURI")}} <h2 id="See_also">See also</h2> diff --git a/files/zh-cn/web/api/element/nextelementsibling/index.html b/files/zh-cn/web/api/element/nextelementsibling/index.html index e78b27fe7a..1ba5c5ce05 100644 --- a/files/zh-cn/web/api/element/nextelementsibling/index.html +++ b/files/zh-cn/web/api/element/nextelementsibling/index.html @@ -88,71 +88,7 @@ if(!("nextElementSibling" in document.documentElement)){ <h2 id="Specification" name="Specification" style="line-height: 30px; font-size: 2.14286rem;">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th style="line-height: 16px;">Feature</th> - <th style="line-height: 16px;">Chrome</th> - <th style="line-height: 16px;">Firefox (Gecko)</th> - <th style="line-height: 16px;">Internet Explorer</th> - <th style="line-height: 16px;">Opera</th> - <th style="line-height: 16px;">Safari</th> - </tr> - <tr> - <td>Basic support (on {{domxref("Element")}})</td> - <td>4</td> - <td>{{CompatGeckoDesktop("1.9.1")}}</td> - <td>9</td> - <td>9.8</td> - <td>4</td> - </tr> - <tr> - <td>Support on {{domxref("CharacterData")}}</td> - <td>29.0</td> - <td>{{CompatGeckoDesktop("25")}} [1]</td> - <td>{{CompatNo}}</td> - <td>16.0</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th style="line-height: 16px;">Feature</th> - <th style="line-height: 16px;">Android</th> - <th style="line-height: 16px;">Firefox Mobile (Gecko)</th> - <th style="line-height: 16px;">IE Mobile</th> - <th style="line-height: 16px;">Opera Mobile</th> - <th style="line-height: 16px;">Safari Mobile</th> - </tr> - <tr> - <td>Basic support (on {{domxref("Element")}})</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("1.9.1")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9.8</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>Support on {{domxref("CharacterData")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("25")}}</td> - <td>{{CompatNo}}</td> - <td>16.0</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<h3 id="sect1"> </h3> +{{Compat("api.Element.nextElementSibling")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/element/outerhtml/index.html b/files/zh-cn/web/api/element/outerhtml/index.html index ae4983baec..0b86ad5775 100644 --- a/files/zh-cn/web/api/element/outerhtml/index.html +++ b/files/zh-cn/web/api/element/outerhtml/index.html @@ -114,53 +114,7 @@ console.log(p.nodeName); <h2 id="浏览器兼容性" style="margin-bottom: 20px; line-height: 30px; font-size: 2.14285714285714rem;">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatGeckoDesktop("11") }}</td> - <td>0.2</td> - <td>4.0</td> - <td>7</td> - <td>1.3</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatGeckoMobile("11") }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.outerHTML")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/element/prefix/index.html b/files/zh-cn/web/api/element/prefix/index.html index ac7b60c010..55ebd4f173 100644 --- a/files/zh-cn/web/api/element/prefix/index.html +++ b/files/zh-cn/web/api/element/prefix/index.html @@ -48,59 +48,7 @@ translation_of: Web/API/Element/prefix <h2 id="Browser_compatibility">Browser compatibility</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>46.0<sup>[1]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("48.0")}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("48.0")}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] This API was previously available on the {{domxref("Node")}} API.</p> +{{Compat("api.Element.prefix")}} <h2 id="See_also">See also</h2> diff --git a/files/zh-cn/web/api/element/previouselementsibling/index.html b/files/zh-cn/web/api/element/previouselementsibling/index.html index a28170c2bb..db2e4caff4 100644 --- a/files/zh-cn/web/api/element/previouselementsibling/index.html +++ b/files/zh-cn/web/api/element/previouselementsibling/index.html @@ -46,74 +46,4 @@ original_slug: Web/API/NonDocumentTypeChildNode/previousElementSibling <h3 id="Specification" name="Specification">浏览器兼容性</h3> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>4</td> - <td>{{ CompatGeckoDesktop("1.9.1") }}</td> - <td>9</td> - <td>9.8</td> - <td>4</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table" style="font-family: 'Open Sans Light', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 16px;"> - <tbody> - <tr> - <th style="line-height: 16px;">Feature</th> - <th style="line-height: 16px;">Android</th> - <th style="line-height: 16px;">Firefox Mobile (Gecko)</th> - <th style="line-height: 16px;">IE Mobile</th> - <th style="line-height: 16px;">Opera Mobile</th> - <th style="line-height: 16px;">Safari Mobile</th> - </tr> - <tr> - <td>Basic support (on {{domxref("Element")}})</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("1.9.1")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9.8</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>Support on {{domxref("CharacterData")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("25")}}</td> - <td>{{CompatNo}}</td> - <td>16.0</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<h3 id="Specification" name="Specification">规范</h3> - -<p><a class="external" href="http://www.w3.org/TR/2008/REC-ElementTraversal-20081222/#attribute-previousElementSibling">Element Traversal Specification: previousElementSibling</a></p> - -<h3 id="相关链接">相关链接</h3> - -<ul> - <li><a class="internal" href="/zh-cn/DOM/Element.childElementCount" title="zh-cn/DOM/Element.childElementCount"><code>childElementCount</code></a></li> - <li><a class="internal" href="/zh-cn/DOM/Element.children" title="zh-cn/DOM/Element.children"><code>children</code></a></li> - <li><a class="internal" href="/zh-cn/DOM/Element.firstElementChild" title="zh-cn/DOM/Element.firstElementChild"><code>firstElementChild</code></a></li> - <li><a class="internal" href="/zh-cn/DOM/Element.lastElementChild" title="zh-cn/DOM/Element.lastElementChild"><code>lastElementChild</code></a></li> - <li><a class="internal" href="/zh-cn/DOM/Element.nextElementSibling" title="zh-cn/DOM/Element.nextElementSibling"><code>nextElementSibling</code></a></li> -</ul> - -<p>{{ languages( {"en": "en/DOM/element.previousElementSibling" } ) }}</p> +{{Compat("api.Element.previousElementSibling")}} diff --git a/files/zh-cn/web/api/element/queryselectorall/index.html b/files/zh-cn/web/api/element/queryselectorall/index.html index b9ebdb8860..f899dd08e5 100644 --- a/files/zh-cn/web/api/element/queryselectorall/index.html +++ b/files/zh-cn/web/api/element/queryselectorall/index.html @@ -71,53 +71,7 @@ var matches = el.querySelectorAll('div.highlighted > p'); <h2 id="浏览器兼容性">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>1</td> - <td>{{CompatGeckoDesktop("1.9.1")}}</td> - <td>8</td> - <td>10</td> - <td>3.2 (525.3)</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("1.9.1")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.querySelectorAll")}} <h2 id="Specification" name="Specification">规范</h2> diff --git a/files/zh-cn/web/api/element/requestfullscreen/index.html b/files/zh-cn/web/api/element/requestfullscreen/index.html index 045a760246..0958227790 100644 --- a/files/zh-cn/web/api/element/requestfullscreen/index.html +++ b/files/zh-cn/web/api/element/requestfullscreen/index.html @@ -74,95 +74,7 @@ translation_of: Web/API/Element/requestFullScreen <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox</th> - <th>Internet Explorer</th> - <th>Edge</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}{{property_prefix("webkit")}}<sup>[1]</sup></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("9.0")}} as <code>mozRequestFullScreen</code><sup>[2]</sup><br> - {{CompatGeckoDesktop("47.0")}} (behind full-screen-api.unprefix.enabled</td> - <td>11{{property_prefix("ms")}}<sup>[3]</sup></td> - <td>{{CompatVersionUnknown}}<sup>[3]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("9.0")}} as <code>mozRequestFullScreen</code><sup>[2]</sup><br> - {{CompatGeckoMobile("47.0")}} (behind full-screen-api.unprefix.enabled</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 同样以<code>webkitRequestFullScreen方法实现。</code></p> - -<p>[2] 使用带有浏览器前缀的<code>mozRequestFullScreen方法实现。在火狐44之前版本,Gecko浏览器内核错误地允许frame里面元素以及object元素进入全屏模式。而在之后的版本,这个漏洞被修复:仅允许位于顶部文档(top-level document)的元素,以及拥有</code>{{htmlattrxref("allowfullscreen", "iframe")}}属性的iframe的内部元素进入全屏显示。. </p> - -<p>[3] 使用IE时,最后的screen的s为小写,也即ms<code>RequestFullscreen,否则无效</code></p> - -<p>[4] 谷歌浏览器前缀webkitRequestFullScreen()里最后的Screen的S也可以为小写s,建议写成驼峰命名法</p> - -<p>[5]将浏览器前缀兼容封装成函数</p> - -<pre>function toFullVideo(){ - - if(videoDom.requestFullscreen){ - - return videoDom.requestFullscreen(); - - }else if(videoDom.webkitRequestFullScreen){ - - return videoDom.webkitRequestFullScreen(); - - }else if(videoDom.mozRequestFullScreen){ - - return videoDom.mozRequestFullScreen(); - - }else{ - - return videoDom.msRequestFullscreen(); - - } - -}</pre> - -<p>[6] 详见 <a href="https://msdn.microsoft.com/en-us/library/dn254939%28v=vs.85%29.aspx">documentation on MSDN</a>.</p> +{{Compat("api.Element.requestFullscreen")}} <h2 id="参阅">参阅</h2> diff --git a/files/zh-cn/web/api/element/scrollleftmax/index.html b/files/zh-cn/web/api/element/scrollleftmax/index.html index 89a30f783d..d054700d59 100644 --- a/files/zh-cn/web/api/element/scrollleftmax/index.html +++ b/files/zh-cn/web/api/element/scrollleftmax/index.html @@ -17,53 +17,7 @@ translation_of: Web/API/Element/scrollLeftMax <h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatGeckoDesktop(16) }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatGeckoMobile(16) }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.scrollLeftMax")}} <h2 id="更多">更多</h2> diff --git a/files/zh-cn/web/api/element/scrolltopmax/index.html b/files/zh-cn/web/api/element/scrolltopmax/index.html index a9b4cbe64d..a2a34d4f98 100644 --- a/files/zh-cn/web/api/element/scrolltopmax/index.html +++ b/files/zh-cn/web/api/element/scrolltopmax/index.html @@ -17,53 +17,7 @@ translation_of: Web/API/Element/scrollTopMax <h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatGeckoDesktop(16) }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatGeckoMobile(16) }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.scrollTopMax")}} <h2 id="See_also">See also</h2> diff --git a/files/zh-cn/web/api/element/shadowroot/index.html b/files/zh-cn/web/api/element/shadowroot/index.html index 2e85ab3d16..0f1452497c 100644 --- a/files/zh-cn/web/api/element/shadowroot/index.html +++ b/files/zh-cn/web/api/element/shadowroot/index.html @@ -77,56 +77,4 @@ attributeChangedCallback(name, oldValue, newValue) { <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>特性</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>基本支持</td> - <td>{{CompatChrome(53.0)}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>特性</th> - <th>Android</th> - <th>Android Webview</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome for Android</th> - </tr> - <tr> - <td> 基本支持</td> - <td>{{CompatNo}}</td> - <td>{{CompatChrome(53.0)}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatChrome(53.0)}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Element.shadowRoot")}} |