HTML DOM Element removeAttribute() Method
HTML DOM Element removeAttribute() Method
The removeAttribute() method is used for removing an attribute from an element. It is similar to removeAttributeNode() but the main difference is that removeAttribute() removes attribute but does not have return while removeAttributeNode() will return the removed object.
Syntax:-
Its syntax is:- element.removeAttribute(name)
Further Explanation:-
Parameter | Description |
name | Required. The name of the attribute. |