javascript empty element code example
Example 1: Javascript remove all child elements
var myDiv = document.getElementById("myDivID");
myDiv.innerHTML = "";//remove all child elements inside of myDiv
Example 2: how to empty an element in javascript
function clearBox(elementID)
{
document.getElementById(elementID).innerHTML = "";
}
//seems like there is no built in funciton's but in jquery
$(element).empty();
Example 3: js remove all child elements from html
document.getElementById("myId").innerHTML = '';