blob: 0f9210e2f7cc3a9459ad896f11231135c027c088 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
---
title: Node.lookupPrefix
slug: Web/API/Node/lookupPrefix
translation_of: Web/API/Node/lookupPrefix
---
<div>{{APIRef("DOM")}}</div>
<p>返回一个和指定命名空间URI绑定的命名空间前缀.如果没有,返回<code>null</code>. 如果有多个绑定的前缀, 返回的结果根据浏览器实现而定.</p>
<p>根据 <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=312019" title="https://bugzilla.mozilla.org/show_bug.cgi?id=312019">bug 312019</a>, 该方法对动态指定的命名空间不起作用.(也就是通过<a href="/en/DOM/Node.prefix" title="En/DOM/Node.prefix">Node.prefix</a>指定的).</p>
<h3 id="相关链接">相关链接</h3>
<ul>
<li><a class="external" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix" rel="freelink">http://www.w3.org/TR/DOM-Level-3-Cor...amespacePrefix</a></li>
<li><a href="/En/Code_snippets/LookupPrefix" title="En/Code_snippets/LookupPrefix">Code snippets: lookupPrefix</a></li>
</ul>
<p>{{ languages( { "en": "en/DOM/Node.lookupPrefix" } ) }}</p>
|