AvailabilityDOM Level 1 Core SynopsisAttr getAttributeNode(String name); Arguments
ReturnsAn Attr node whose descendants represent the value of the named attribute, or null if this element has no such attribute. DescriptiongetAttributeNode( ) returns an Attr node that represents the value of a named attribute. Note that this Attr node can also be obtained through the attributes property inherited from the Node interface. The attribute value is represented by the descendants of the Attr nodes. In HTML documents, an Attr node has a single Text node child, and it is always easier to query an attribute value by calling getAttribute( ), which returns the value as a string. getAttributeNode( ) is necessary only when you are working with XML documents that contain entity references in their attribute values. See AlsoElement.getAttribute( ), Element.getAttributeNodeNS( ), Node.attributes |