getElementById method
Gets the element that matches the specified ID from the SVG document or document fragment.
![]() ![]() |
Syntax
var retval = SVGSVGElement.getElementById(elementId);Parameters
- 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
- Scalable Vector Graphics: Document Structure, Section 5.11.2
Remarks
The search for the specified element is restricted to a subset of the document tree.
See also
Show:

