Remove the style attribute node from a header element:
Before removing the attribute:
After removing the attribute:
The removeAttributeNode() method removes the specified attribute, and returns the removed attribute, as an Attr Node object.
The difference between this method and the removeAttribute() method is that the removeAttribute() method removes the attribute with the specified name, while this method removes the specified Attr object. The result will be the same. Also, the removeAttribute() method has no return value, while this method returns the removed attribute, as an Attr object.
See also the removeAttribute() method
The removeAttributeNode() method is supported in all major browsers, except Internet Explorer.
|attributenode||Attr object||Required. The attribute node you want to remove|
|Attr object||The removed attribute node|
|DOM Version||Core Level 1|
Your message has been sent to W3Schools.