Connecting Tech Pros Worldwide Help | Site Map

Accessing elements

  #1  
Old May 17th, 2007, 01:45 PM
Gandalf
Guest
 
Posts: n/a
Hi everyone,
How can I access to specific element by javascript and not by using
the getElementById method

thanks

  #2  
Old May 17th, 2007, 02:25 PM
Evertjan.
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing elements of IFrame.. dmjpro answers 5 October 15th, 2008 12:04 PM
Accessing elements of static array by name Paul Brettschneider answers 5 August 26th, 2007 06:35 PM
Accessing elements drawn with script Christopher Benson-Manica answers 3 July 23rd, 2005 08:00 PM
Accessing elements of a form... Paweł answers 4 July 20th, 2005 04:02 PM