xxxxxxxxxx
function removeElementsByClass(className){
var elements = document.getElementsByClassName(className);
while(elements.length > 0){
elements[0].parentNode.removeChild(elements[0]);
}
}
xxxxxxxxxx
const div = document.querySelector('div') // Get element from DOM
div.classList.remove('info') // Remove class "info"
xxxxxxxxxx
function myFunction() {
var element = document.getElementById("myDIV");
element.classList.remove("mystyle");
}
xxxxxxxxxx
// Assuming there is an element with ID "myElement" and it has a class "myClass"
var element = document.getElementById("myElement");
element.classList.remove("myClass");
xxxxxxxxxx
// Get the element to remove the class from
const element = document.getElementById("yourElementId");
// Remove the class from the element
element.classList.remove("yourClassName");
xxxxxxxxxx
const element = document.getElementById("elementId"); // replace "elementId" with the actual ID of the element
element.classList.remove("className"); // replace "className" with the actual name of the class