js delete all child code example
Example 1: delete all childs in node
while (myNode.firstChild) {
myNode.removeChild(myNode.lastChild);
}
Example 2: how to remove all child elements in javascript
document.getElementById("myDivID").innerHTML = "";