remove all childnode div js code example
Example 1: delete all childs in node
while (myNode.firstChild) {
myNode.removeChild(myNode.lastChild);
}
Example 2: js remove all child elements from html
document.getElementById("myId").innerHTML = '';