getAttributeNode
Returns the attribute of the current element as a separate node.
Syntax
attributeNode = element.getAttributeNode(nodeName)Parameters
nodeName is a string containing the name of the node.
attributeNode is a separate Attribute node.
Example
// html: <div id="top" /> t = document.getElementById("top"); iNode = t.getAttributeNode("id"); // iNode.value = "top"
Notes
The Attribute node inherits from node, but is not considered a part of the document tree. Common node attributes like parentNode, previousSibling, and nextSibling are NULL for an Attribute node. You can, however, get the element to which the attribute belongs with the ownerElement property.
Specification
getAttributeNode
Netscape Communications http://developer.netscape.com |