Eliminar todos los niños en el nodo
while (myNode.firstChild) {
myNode.removeChild(myNode.lastChild);
}
George_agg
while (myNode.firstChild) {
myNode.removeChild(myNode.lastChild);
}
var myDiv = document.getElementById("myDivID");
myDiv.innerHTML = "";//remove all child elements inside of myDiv
parent.querySelectorAll("*").forEach(child -> child.remove());
//Change the value of * if there is a specific class you want to remove
//otherwise leave the * for removing all child elements.