HTML DOM Element getAttributeNode()
HTML DOM Element getAttributeNode() Method
The getAttributeNode() method is used to return Attribute object. For accessing the attribute value, we have to Attr value property. It is distinguished from the getAttribute() method because this method return value of an attribute.
Syntax:-
Its syntax is:- element.getAttributeNode(name)
Return:-
Its return is:- Attr object of the attribute node else null
Further Explanation:-
Parameter | Description |
name | Required. The name of the attribute. |