Delete all children nodes
To remove all children nodes (from childNodes list) use: while(listNode.firstChild) { // delete all nodes listNode.removeChild(listNode.firstChild); } Of course innerHTML will work too: listNode.innerHTML = '';