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"><breadcrumbs></breadcrumbs></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"><code>removeAttributeNS</code> 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">* <code>namespace</code> is a string that contains the namespace of the attribute. * <code>attrName</code> 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>// <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" />
</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>
|