Menu
So I have a span which inside it has anchors, images, and checkboxes. Is there an easy way to get an array of all the checkboxes inside that span?
I tried stuff like:
[code]
branch = document.getElementById(branchid);
for (i in branch.children) {
alert(branch.children[i].nodeName);
}
With the idea that I can test to see if node name is an input. Yet this alert doesn’t do anything. I think my use of DOM is incorrect and that’s what I would like help with. But more importantly, is there an easier way to do get access to the array of checkboxes inside a span using DOM?