Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns a reference to the first object with the specified value of the IHTMLElement::id or IHTMLDOMAttribute2::name attribute.
IHTMLElement retVal = object.getElementById(v);
v [in]
Type: BSTR
A BSTR that specifies the ID value. Case-insensitive.
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.
Please sign in to use this experience.
Sign in