Accessing elements

G

Gandalf

Hi everyone,
How can I access to specific element by javascript and not by using
the getElementById method

thanks
 
E

Evertjan.

Gandalf wrote on 17 mei 2007 in comp.lang.javascript:
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>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,428
Latest member
RosalieQui

Latest Threads

Top