I am having a <div> with <a>s and <div>s inside it.
I am trying to read in all the elements in the right order.
With mydiv.getElemen tsByTagName("a" ) I can get the elements of a specific
tag like "a", but I want all types.
I tried getChildNodes but that doesn't seem to be widely supported.
childNodes[] seemed to do something but I couldn't get it working when I
wanted to browse through the elements.
What is the best way to do this?
A related question. If I have an element, how can I see which type (a, div,
input,etc) it is?
Thanks,
Wim
I am trying to read in all the elements in the right order.
With mydiv.getElemen tsByTagName("a" ) I can get the elements of a specific
tag like "a", but I want all types.
I tried getChildNodes but that doesn't seem to be widely supported.
childNodes[] seemed to do something but I couldn't get it working when I
wanted to browse through the elements.
What is the best way to do this?
A related question. If I have an element, how can I see which type (a, div,
input,etc) it is?
Thanks,
Wim
Comment