How to remove attributes from a DOM element using JavaScript?
Originally posted here!
To remove an attribute from a DOM element, we can use the removeAttribute() method in the element in JavaScript.
Let's say we have a paragraph tag with id attribute like this,
<!-- Paragraph -->
<p id="myParagraph">Hello Worl...
melvingeorge-me.hashnode.dev1 min read