aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/element/removeattributenode/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/api/element/removeattributenode/index.html')
-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>