Programmer's Guide > Interfaces > W3C Document interface > getElementById method
  
getElementById method
Returns the Element whose ID is given by elementId. If no such element exists, returns null. Behavior is not defined if more than one element has this ID.
* 
The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return null.
getElementById(elementId )
Parameters
StringelementId
The unique id value for an element.
Returns
Element. The matching element.