| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| GetElementsBy | |
|---|---|
| Tweet Topic Started: Jan 16 2005, 09:28 AM (389 Views) | |
| kingy | Jan 16 2005, 09:28 AM Post #1 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
what is this command in javascript? i see it all the time in IF but i don't get what it does..if somebody could talk me thoruhg it i would appreciate it. i have looked on the web but i would like to know what its effect is in the context of IF thanks for any help |
![]() |
|
| Stefan | Jan 16 2005, 02:36 PM Post #2 |
![]()
Mew?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
getElementsByTagName() gets the elements with a certain tag contained by an element... Uhm.... Maybe an example will explain it better. For instance, this:
Assigns an array with all DIV elements from the document object to the e variable... Sorry, I'm terrible at explaining things >_< |
![]() |
|
| kingy | Jan 16 2005, 03:11 PM Post #3 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
but why is this useful in IF codes? i don't see what you could do with that sorry if i am being stupid |
![]() |
|
| Stefan | Jan 16 2005, 04:10 PM Post #4 |
![]()
Mew?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well, for instance, the mini profile at posts is a <span> element, with the "postdetails" class attribute. To loop through all mini profiles on a page, you could use something like this:
|
![]() |
|
| kingy | Jan 16 2005, 04:33 PM Post #5 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
oh i get it now. cheers stefan |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
6:44 PM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)




6:44 PM Jul 11