You should walk the DOM if you want all child nodes. Here's a simple example.
Code:function walkDOM(obj) { // obj is the current DOM object alert(obj.innerHTML); node = node.firstChild; while (obj) { walkDOM(obj); node = node.nextSibling; } } // call the walk function walkDOM(document.getElementsByTagName('body')[0]);




Reply With Quote
