If you want all children of tdiv
to be added to el
then try
var el = document.getElementById('x')
while (tdiv.firstChild) {
el.appendChild(tdiv.firstChild);
}
Demo: Fiddle
4
solved Get all child nodes javascript
If you want all children of tdiv
to be added to el
then try
var el = document.getElementById('x')
while (tdiv.firstChild) {
el.appendChild(tdiv.firstChild);
}
Demo: Fiddle
4
solved Get all child nodes javascript