/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function removeChildrenFromNode(node) { if(node.hasChildNodes()) { while(node.childNodes.length >= 1 ) { node.removeChild(node.firstChild); } } }