Actually, once the Ajax added content has been fully loaded, getElementsByTagName should work. However, if you are targeting the members of a getElementsByTagName collection by number, ex:
Code:
document.getElementsByTagName('span')[0]
The number 0 which refers to the first span on the page may no longer point to the element that you have in mind.
If all you are after is a single element, getElementById will work fine. If you need a number of elements, getElementsByTagName should be fine but you may need another way to determine which of the tags that this 'gets' are the ones that you want to act on.
Bookmarks