aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/element/removeattributens/index.html
blob: 57d7763880cfc1d4bcd07fd45282e7cde964c0c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: element.removeAttributeNS
slug: Web/API/Element/removeAttributeNS
translation_of: Web/API/Element/removeAttributeNS
---
<p><span class="comment">&lt;breadcrumbs&gt;&lt;/breadcrumbs&gt;</span>{{ ApiRef("DOM") }}<span class="comment">== Summary ==</span></p>

<h3 id=".E6.A6.82.E8.A6.81" name=".E6.A6.82.E8.A6.81">概要</h3>

<p><span class="comment">&lt;code&gt;removeAttributeNS&lt;/code&gt; removes the specified attribute from an element.</span> <code>removeAttributeNS</code> 要素から指定の属性を取り除きます。</p>

<p><span class="comment">{{ fx_minversion_inline("3") }} In Firefox 3 and later, this method resets DOM values to their defaults.</span> {{ Fx_minversion_inline("3") }} Firefox 3以降ではこのメソッドはDOMの値をデフォルト値にリセットします。<span class="comment">== Syntax ==</span></p>

<h3 id=".E6.A7.8B.E6.96.87" name=".E6.A7.8B.E6.96.87">構文</h3>

<pre class="eval"><em>element</em>.removeAttributeNS(<em>namespace</em>,<em>attrName</em>);
</pre>

<p><span class="comment">* &lt;code&gt;namespace&lt;/code&gt; is a string that contains the namespace of the attribute. * &lt;code&gt;attrName&lt;/code&gt; is a string that names the attribute to be removed from the current node.</span></p>

<ul>
 <li><code>namespace</code> は属性の名前空間を含んでいる文字列です。</li>
 <li><code>attrName</code> は現在のノードから取り除く属性の名前を表す文字列です。<span class="comment">== Example ==</span></li>
</ul>

<h3 id=".E4.BE.8B" name=".E4.BE.8B"></h3>

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

<h3 id=".E6.B3.A8.E8.A8.98" name=".E6.B3.A8.E8.A8.98">注記</h3>

<p>{{ DOMAttributeMethods() }}<span class="comment">== Specification ==</span></p>

<h3 id=".E4.BB.95.E6.A7.98" name=".E4.BB.95.E6.A7.98">仕様</h3>

<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-ElRemAtNS">DOM Level 2 Core: removeAttributeNS</a></p>