Answers for "how to unset all class from an elemtne javascript"

0

remove a class from all elements javascript

var class_name='classname';

elements=document.getElementsByClassName(class_name)

for(element of elements){
  element.classList.remove(class_name)
}
Posted by: Guest on May-26-2021

Code answers related to "how to unset all class from an elemtne javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language