Connecting Tech Pros Worldwide Help | Site Map

Accessing elements

Gandalf
Guest
 
Posts: n/a
#1: May 17 '07
Hi everyone,
How can I access to specific element by javascript and not by using
the getElementById method

thanks

Evertjan.
Guest
 
Posts: n/a
#2: May 17 '07

re: Accessing elements


Gandalf wrote on 17 mei 2007 in comp.lang.javascript:
Quote:
How can I access to specific element by javascript and not by using
the getElementById method
How would you make it specific?

You could cycle trough all elemants looking for a specific innerHTML,
or find the 3rd element with tag "SPAN", but there could be two elements
having the same innerHTML or a span element could be inserted?

No, only elements that should only exist once, like an IDed element is
specific per definition, or it must <body>.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Closed Thread