element.removeAttributeNS
<breadcrumbs></breadcrumbs>
== Summary ==ๆฆ่ฆ
<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 ==
ๆงๆ
element.removeAttributeNS(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 ==
ไพ
// <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" />
ๆณจ่จ
DOM ใกใฝใใใฏ่ฆ็ด ใฎๅฑๆงใๅใๆฑใใพใใ
ๅๅ็ฉบ้ใซ็ก้ขไฟใ ๆใไธ่ฌ็ใซไฝฟ็จใใใใกใฝใใ |
ๅๅ็ฉบ้ใซ้ๅฎใใใๅคๆฐ (DOM Level 2) |
Attr ใใผใใ็ดๆฅๆฑใ DOM ใฌใใซ 1 ใฎใกใฝใใ(ใปใจใใฉไฝฟ็จใใใชใ) |
Attr ใใผใใ็ดๆฅๆฑใ DOM ใฌใใซ 2 ๅๅ็ฉบ้ใซ้ๅฎใใใใกใฝใใ(ใปใจใใฉไฝฟ็จใใใชใ) |
---|---|---|---|
setAttribute (DOM 1) |
setAttributeNS |
setAttributeNode |
setAttributeNodeNS |
getAttribute (DOM 1) |
getAttributeNS |
getAttributeNode |
getAttributeNodeNS |
hasAttribute (DOM 2) |
hasAttributeNS |
- | - |
removeAttribute (DOM 1) |
removeAttributeNS |
removeAttributeNode |
- |