Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content

getElementById method

Gets the element that matches the specified ID from the SVG document or document fragment.

Scalable Vector Graphics: Document Structure, Section 5.11.2Internet Explorer 9



var retval = SVGSVGElement.getElementById(elementId);


elementId [in]

Type: String

The unique ID value for the element to find.

Return value

Type: IHTMLElement

The element whose ID matches the elementId value. If getElementById cannot find a matching element, it returns null. If getElementById finds more than one element that has the specified ID, the behavior is undefined.

Standards information


The search for the specified element is restricted to a subset of the document tree.

See also




© 2015 Microsoft