From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/element/getattributenodens/index.html | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 files/zh-cn/web/api/element/getattributenodens/index.html (limited to 'files/zh-cn/web/api/element/getattributenodens') diff --git a/files/zh-cn/web/api/element/getattributenodens/index.html b/files/zh-cn/web/api/element/getattributenodens/index.html new file mode 100644 index 0000000000..5b1c9d8181 --- /dev/null +++ b/files/zh-cn/web/api/element/getattributenodens/index.html @@ -0,0 +1,36 @@ +--- +title: Element.getAttributeNodeNS() +slug: Web/API/Element/getAttributeNodeNS +tags: + - API + - DOM +translation_of: Web/API/Element/getAttributeNodeNS +--- +

{{ APIRef("DOM") }}

+ +

概要

+ +

通过命名空间 URI 和名称来获取属性节点。

+ +

语法

+ +
attributeNode = element.getAttributeNodeNS(namespace,nodeName)
+
+ + + +

== Example == TBD The example needs to be fixed pre> // html: <div id="top" /> t = document.getElementById("top"); specialNode = t.getAttributeNodeNS( "http://www.mozilla.org/ns/specialspace", "id"); // iNode.value = "full-top" </pre

+ +

笔记

+ +

getAttributeNodeNS 相比 getAttributeNode 更加具体,允许你在特定的命名空间里获取属性. 对应的 setter 方法是 setAttributeNodeNS.

+ +

{{ DOMAttributeMethods() }}

+ +

规格

+ +

DOM Level 2 Core: getAttributeNodeNS

-- cgit v1.2.3-54-g00ecf