delete all childs in node
snippet in javascript

delete all childs in node

user4516

while (myNode.firstChild) {
  myNode.removeChild(myNode.lastChild);
}

Javascript remove all child elements

user9149

var myDiv = document.getElementById("myDivID");
    myDiv.innerHTML = "";//remove all child elements inside of myDiv