getElementById method

Returns a reference to the first object with the specified value of the IHTMLElement::id or IHTMLDOMAttribute2::name attribute.

Document Object Model (DOM) Level 3 Core Specification, Section 1.4



IHTMLElement retVal = object.getElementById(v);


v [in]

Type: BSTR

A BSTR that specifies the ID value. Case-insensitive.

Standards information


If more than one element is found, IHTMLDocument3::getElementById returns the first object in the collection.

Windows Internet Explorer 8 or later. An alternate implementation is available. For more information, see getElementById.

See also

About the W3C Document Object Model