Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript kill all childs

function removeAllChildNodes(parent) {
    while (parent.firstChild) {
        parent.removeChild(parent.firstChild);
    }
}
Code language: PHP (php)
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #javascript #kill #childs
ADD COMMENT
Topic
Name
8+1 =