View Single Post
Old 15-05-2008, 16:10   #3 (permalink)
KarateRobot
Registered User
 
KarateRobot's Avatar
 
Join Date: May 2008
Location: Seattle
Posts: 64
pgo said it, I'll just throw out some notes:

document.all is a reaaaaally old and outdated method of grabbing something in the page. getElementById does the same thing, but is now the preferred method, and is part of the standard, so it will continue to be supported well into the future, whereas document.all won't be.

For getElementById, The ID in question is the HTML attribute "ID", which can be applied to almost every element. It's meant to be a unique identifier, so if (heaven forbid) you had two elements with the same ID, it should only ever return the first one on the page.
  Reply With Quote