Partager via


getElementById method

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

 

Syntax

IHTMLElement retVal = object.getElementById(v);

Parameters

  • v [in]
    Type: BSTR

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

Standards information

Remarks

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