aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/namednodemap/getnameditem/index.html
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/namednodemap/getnameditem/index.html
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/namednodemap/getnameditem/index.html')
-rw-r--r--files/zh-cn/web/api/namednodemap/getnameditem/index.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/namednodemap/getnameditem/index.html b/files/zh-cn/web/api/namednodemap/getnameditem/index.html
new file mode 100644
index 0000000000..0f6ca2b196
--- /dev/null
+++ b/files/zh-cn/web/api/namednodemap/getnameditem/index.html
@@ -0,0 +1,29 @@
+---
+title: NamedNodeMap.getNamedItem()
+slug: Web/API/NamedNodeMap/getNamedItem
+tags:
+ - DOM
+ - 参考
+ - 属性
+ - 方法
+translation_of: Web/API/NamedNodeMap/getNamedItem
+---
+<div>{{APIRef("DOM")}}</div>
+
+<p>{{domxref("NamedNodeMap")}} 接口的 <code><strong>NamedNodeMap.getNamedItem()</strong></code> 方法返回对应给定名称的{{domxref("Attr", "属性")}},如果没有对应名称的属性则返回 <code>null</code></p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><em>myAttr</em> = attrs.getNamedItem(<em>name</em>)</pre>
+
+<h3 id="参数">参数</h3>
+
+<ul>
+ <li><code>name</code> 是期望获取的属性名</li>
+</ul>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.NamedNodeMap.getNamedItem")}}</p>