function loadNode(node){ for(var i=0;i 0){ console.log(node.childNodes[i]) loadNode(node.childNodes[i]) } } } loadNode(document.documentElement)