DHTML Methods
DOM Level 2 Specification.
Retrieves the element with the given id.
objELement = document.getElementById ( elementID )
elementID |
String specifying the unique id value of the element to find. |
Returns the matching element.
If no such element exists, returns null
. Behavior is not defined if more than one element has this ID
.
Note that 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
.
getElementsByTagName