Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript remove all children with class

var container = document.getElementById("container");
var elements = container.getElementsByClassName("deleteme");

while (elements[0]) {
    elements[0].parentNode.removeChild(elements[0]);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #remove #children #class
ADD COMMENT
Topic
Name
1+1 =