This is a discussion on "[SOLVED] document.getElementsByTagName" within the JavaScript Forum section. This forum, and the thread "[SOLVED] document.getElementsByTagName are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] document.getElementsByTagName
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
[SOLVED] document.getElementsByTagName
There seems to be 2 ways of accessing elements using this method - document.getElementsByTagName(tag)[0] or document.getElementsByTagName(tag).item(0)
Is one just for HTML, and the other for HTML & XML? Can anyone explain the difference between the two? |
|
|
|
||||
|
Re: document.getElementsByTagName
I have not yet noted any differences in these methods. They both work in HTML and XHTML. It is another way to access the array of elements returned by the function.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] popup and document.write problem in IE | deluxmilkman | JavaScript Forum | 3 | Oct 3rd, 2007 11:26 |
| document.getElementById and document.getElementByName is not working in FF | dhineraj | JavaScript Forum | 3 | Jul 26th, 2007 20:23 |
| can i add word document? | monstermunch | Starting Out | 8 | Apr 20th, 2007 16:49 |
| Document Information | ClaireB | Classic ASP | 0 | Oct 24th, 2006 17:46 |
| using tables in a css document | ivyholly | Web Page Design | 11 | Dec 31st, 2005 18:07 |