delelete all chiolds of a div in 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 = '';