HTML DOM Attributes setNamedItem()
HTML DOM Attributes setNamedItem() Method
The setNamedItem() method is used for adding an attribute node to a NamedNodeMap. If the new attribute node already presents it will replaced the old one and the old one is returned else return is null.
Syntax:-
Its syntax is:- namednodemap.setNamedItem(node)
Return:-
Its return is:- replaced node else null
Further Explanation:-
Parameter | Description |
node | Required. The node to add/replace in NamedNodeMap. |