aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/element/removeattributenode
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/ja/web/api/element/removeattributenode
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/element/removeattributenode')
-rw-r--r--files/ja/web/api/element/removeattributenode/index.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/files/ja/web/api/element/removeattributenode/index.html b/files/ja/web/api/element/removeattributenode/index.html
new file mode 100644
index 0000000000..b85d06ff16
--- /dev/null
+++ b/files/ja/web/api/element/removeattributenode/index.html
@@ -0,0 +1,45 @@
+---
+title: element.removeAttributeNode
+slug: Web/API/Element/removeAttributeNode
+tags:
+ - DOM
+ - Gecko
+ - 翻訳中
+translation_of: Web/API/Element/removeAttributeNode
+---
+<p>{{ ApiRef("DOM") }}</p>
+
+<h3 id="Summary" name="Summary">Summary</h3>
+
+<p><code>removeAttributeNode</code> removes the specified attribute from the current element.</p>
+
+<h3 id="Syntax" name="Syntax">Syntax</h3>
+
+<pre class="eval"><em>removedAttr</em> =<em>element</em>.removeAttributeNode(<em>attributeNode</em>)
+</pre>
+
+<ul>
+ <li><code>attributeNode</code> is the <code>Attr</code> node that needs to be removed.</li>
+ <li><code>removedAttr</code> is the removed <code>Attr</code> node.</li>
+</ul>
+
+<h3 id="Example" name="Example">Example</h3>
+
+<pre>// &lt;div id="top" align="center" /&gt;
+var d = document.getElementById("top");
+var d_align = d.getAttributeNode("align");
+d.removeAttributeNode(d_align);
+// align has a default value, center,
+// so the removed attribute is immediately
+// replaced: &lt;div id="top" align="center" /&gt;
+</pre>
+
+<h3 id="Notes" name="Notes">Notes</h3>
+
+<p>If the removed Attribute has a default value it is immediately replaced. The replacing attribute has the same namespace URI and local name, as well as the original prefix, when applicable.</p>
+
+<p>{{ DOMAttributeMethods() }}</p>
+
+<h3 id="Specification" name="Specification">Specification</h3>
+
+<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-D589198">DOM Level 2 Core: removeAttributeNode</a> (introduced in <a class="external" href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#method-removeAttributeNode">DOM Level 1 Core</a>)</p>