Hello is there any way to edit html tag class name from script? For example:
html:
<div id="ThisIsId" class= "ThisIsName"> ... </div>
Script:
<script>
document.getElementById("ThisIsId").changeClassName("thisIsNewClassName")
</script>
Hello is there any way to edit html tag class name from script? For example:
html:
<div id="ThisIsId" class= "ThisIsName"> ... </div>
Script:
<script>
document.getElementById("ThisIsId").changeClassName("thisIsNewClassName")
</script>
<script>
document.getElementById("ThisIsId").classList.remove("ThisIsName").add("thisIsNewClassName")
</script>