Document.GetElementById

Document.GetElementById method

Returns the Element that has an ID attribute with the given value. If no such element exists, this returns null. If more than one element has an ID attribute with that value, what is returned is undefined.

public Element GetElementById(string elementId)
ParameterTypeDescription
elementIdStringThe element id.

Return Value

The Element.

See Also