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/removeattributens/index.html | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 files/zh-cn/web/api/element/removeattributens/index.html (limited to 'files/zh-cn/web/api/element/removeattributens/index.html') diff --git a/files/zh-cn/web/api/element/removeattributens/index.html b/files/zh-cn/web/api/element/removeattributens/index.html new file mode 100644 index 0000000000..f1c35b27fd --- /dev/null +++ b/files/zh-cn/web/api/element/removeattributens/index.html @@ -0,0 +1,37 @@ +--- +title: Element.removeAttributeNS() +slug: Web/API/Element/removeAttributeNS +translation_of: Web/API/Element/removeAttributeNS +--- +

{{ APIRef("DOM") }}

+ +

removeAttributeNS 移除元素的指定属性

+ +

{{ Fx_minversion_inline(3) }} 在Firefox 3及更高版本中,此方法会将DOM值重置为其默认值。

+ +

用法

+ +
element.removeAttributeNS(namespace,attrName);
+
+ + + +

例子

+ +
// <div id="div1" xmlns:special="http://www.mozilla.org/ns/specialspace"
+//      special:specialAlign="utterleft" width="200px" />
+d = document.getElementById("div1");
+d.removeAttributeNS("http://www.mozilla.org/ns/specialspace", "specialAlign");
+// now: <div id="div1" width="200px" />
+
+ +

Notes

+ +

{{ DOMAttributeMethods() }}

+ +

Specification

+ +

DOM Level 2 Core: removeAttributeNS

-- cgit v1.2.3-54-g00ecf