diff options
Diffstat (limited to 'files/zh-cn/conflicting/web/api/element/prefix/index.html')
-rw-r--r-- | files/zh-cn/conflicting/web/api/element/prefix/index.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/files/zh-cn/conflicting/web/api/element/prefix/index.html b/files/zh-cn/conflicting/web/api/element/prefix/index.html new file mode 100644 index 0000000000..06c46e0ad9 --- /dev/null +++ b/files/zh-cn/conflicting/web/api/element/prefix/index.html @@ -0,0 +1,77 @@ +--- +title: Node.prefix +slug: conflicting/Web/API/Element/prefix +translation_of: Web/API/Node/prefix +original_slug: Web/API/Node/prefix +--- +<div> + {{ApiRef}}</div> +<h2 id="Summary" name="Summary">概述</h2> +<p><code>prefix属性会</code>返回当前节点的命名空间前缀,如果没有指定命名空间前缀,则返回<code>null</code>,该属性只读.</p> +<h2 id="Syntax" name="Syntax">语法</h2> +<pre class="syntaxbox"><var>string</var> = element.prefix +</pre> +<h2 id="Examples" name="Examples">示例</h2> +<p>下面的代码将弹出"x".</p> +<pre class="brush:xml"><x:div onclick="alert(this.prefix)"/> +</pre> +<h2 id="Notes" name="Notes">附注</h2> +<p>该属性只在一个解析命名空间前缀的文档中可用,也就是说,只有在文档的MIME类型为XML,XHTML,XUL时可用,在HTML文档中不可用.</p> +<h2 id="Specification" name="Specification">规范</h2> +<ul> + <li><a href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-NodeNSPrefix">Node.prefix</a> (introduced in DOM2)</li> +</ul> +<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>{{CompatUnknown}}</td> + <td> + <p>{{CompatVersionUnknown}}</p> + <p>在Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)之前,该属性是可写的; 之后,是只读的.</p> + </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>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> + <p>{{CompatVersionUnknown}}</p> + <p>P在Gecko 5.0 (Firefox 5.0 / Thunderbird 5.0 / SeaMonkey 2.2)之前,该属性是可写的; 之后,是只读的.</p> + </td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> + </table> +</div> +<p></p> |