+ 2

How to remove html attribute from JS DOM?

1st Feb 2021, 10:06 AM
Unknown Ambusher 🗡️
Unknown Ambusher 🗡️ - avatar
2 Antworten
+ 2
You can do it by using removeAttribute method Example: document.getElementsByTagName("div")[0].removeAttribute("class");
1st Feb 2021, 10:13 AM
Ayush Kumar
Ayush Kumar - avatar
1st Feb 2021, 10:36 AM
Unknown Ambusher 🗡️
Unknown Ambusher 🗡️ - avatar