/ Published in: JavaScript
Released into the public domain. Example: elementNodes(document.getElementById('content')) refers to an array of all the elements inside the element with the ID content.
Expand |
Embed | Plain Text
function elementNodes(elmnt) { nodes = []; for(var i=0;i<elmnt.childNodes.length;i++) { if(elmnt.childNodes[i].nodeType==1) nodes.push(elmnt.childNodes[i]); } return nodes; }
You need to login to post a comment.
