Connecting Tech Pros Worldwide Help | Site Map

Accessing elements

 
LinkBack Thread Tools Search this Thread
  #1  
Old May 17th, 2007, 12:45 PM
Gandalf
Guest
 
Posts: n/a
Default Accessing elements

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

thanks


  #2  
Old May 17th, 2007, 01:25 PM
Evertjan.
Guest
 
Posts: n/a
Default 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)
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.