[Javascript] Enumerate through element in NS 6/7
Reuben D. Budiardja
reubendb at innovativethought.com
Mon Oct 21 11:31:51 CDT 2002
Sory.. the last message got sent by mistake. Anyway, here is the complete
message.
Hello all,
In NS4, I can accessing layer element (eg <DIV>) using
document.layers[index]
where index is integer. This is useful if we want to go through all layers
using loop for example. Similarly, in IE:
document.all[element]
But I think, the spec recommended by W3C is to get element using:
document.getElementById(element_name)
This works in Mozilla, NS 6/7, and IE > 5.5 I think. The former does not work
in Mozilla, NS 6/7. So how can I iterate through element using the similar
way with document.layers[index] for those newer browser?
I looked through Mozilla doc for example, but didn't find anything that I
want. Anyone knows about this?
Thanks a lot.
Reuben D. Budiardja
More information about the Javascript
mailing list