Javascript Reference
Categories: Element

javascript Element getAttributeNode( )

@March 15, 2008, 1:22 a.m.
getAttributeNode( )Firefox/Netscape/NN 6 IE 6 Chrome/Safari/DOM 1  



Returns a reference to the attribute node (Attr object) associated with the name. This type of node is the same kind that populates the array returned by an element's attributes property, but the getAttributeNode( ) method gives you direct access to the Attr node object by name. More helpful in XML documents, where an attribute can convey important data associated with the element. See the Attr object for details about that node type.

  • The attribute name used in the tag (not including the = symbol). Neither IE nor Navigator demands case-sensitivity. But given the trend toward case-sensitive XHTML, it is best to get into the case-sensitive habit.
Returned Value

Reference to an Attr object.

Powered by Linode.