-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,59 @@ | ||
--- | ||
title: element.removeAttributeNS | ||
title: Element.removeAttributeNS() | ||
slug: Web/API/Element/removeAttributeNS | ||
page-type: web-api-instance-method | ||
tags: | ||
- API | ||
- DOM | ||
- Element | ||
- Method | ||
- NeedsSpecTable | ||
- Reference | ||
browser-compat: api.Element.removeAttributeNS | ||
translation_of: Web/API/Element/removeAttributeNS | ||
l10n: | ||
sourceCommit: 196cc4ff3068a59b962a3fe1cbb960eb72ef542b | ||
--- | ||
\<breadcrumbs>\</breadcrumbs>{{ ApiRef("DOM") }}== Summary == | ||
{{ APIRef("DOM") }} | ||
|
||
### 概要 | ||
**`removeAttributeNS()`** は {{domxref("Element")}} インターフェイスのメソッドで、要素から指定された属性を取り除きます。 | ||
|
||
\<code>removeAttributeNS\</code> removes the specified attribute from an element. `removeAttributeNS` 要素から指定の属性を取り除きます。 | ||
## 構文 | ||
|
||
In Firefox 3 and later, this method resets DOM values to their defaults. Firefox 3 以降ではこのメソッドは DOM の値をデフォルト値にリセットします。== Syntax == | ||
```js | ||
removeAttributeNS(namespace, attrName) | ||
``` | ||
|
||
### 構文 | ||
### 引数 | ||
|
||
``` | ||
element.removeAttributeNS(namespace,attrName); | ||
``` | ||
- `namespace` は文字列で、属性の名前空間を示します。 | ||
- `attrName` は文字列で、現在のノードから取り除く属性の名前を示します。 | ||
|
||
\* \<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. | ||
### 返値 | ||
|
||
- `namespace` は属性の名前空間を含んでいる文字列です。 | ||
- `attrName` は現在のノードから取り除く属性の名前を表す文字列です。== Example == | ||
なし ({{jsxref("undefined")}})。 | ||
|
||
### 例 | ||
|
||
``` | ||
// <div id="div1" xmlns:special="http://www.mozilla.org/ns/specialspace" | ||
// special:specialAlign="utterleft" width="200px" /> | ||
```js | ||
// Given: | ||
// <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" /> | ||
// Now: <div id="div1" width="200px" /> | ||
``` | ||
|
||
### 注記 | ||
## メモ | ||
|
||
{{ DOMAttributeMethods() }} | ||
|
||
## 仕様書 | ||
|
||
{{Specifications}} | ||
|
||
{{ DOMAttributeMethods() }}== Specification == | ||
## ブラウザーの互換性 | ||
|
||
### 仕様 | ||
{{Compat}} | ||
|
||
[DOM Level 2 Core: removeAttributeNS](http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-ElRemAtNS) | ||
Firefox 3 以降では、このメソッドは DOM 値を既定値にリセットします。 |