136
rated 0 times
[
138]
[
2]
/ answers: 1 / hits: 28941
/ 13 Years ago, tue, december 20, 2011, 12:00:00
I am learning the basics of javascript. now it DOM and i am stuck here, How can i remove a parent node with all its chldren. eg say i have the html code like this.
<ul id =parent>
<li>Hi</li>
<li>How</li>
<li>Are</li>
<li>You</li>
</ul>
i wand to delete the <ul>
element with all its child <li>
nodes. I tried it to do like this document.getElementById('parent').removeNode(true);
but its not working. Can anyone help me here. ?
More From » javascript