How to Remove HTML Element Attribute using Javascript
I had to remove a HTML element on page unmount in React and I came to know about removeAttribute() method. Let鈥檚 have look at this. Syntax node.removeAttribute(attrName); // node is nothing but an element whose attribute has to be removed Return value is undefined Parameters A string specifying the name of the attribute to remove from the element. If the specified attribute does not exist,removeAttribute() returns without generating an error....