getElementById

getElementById returns the first element within the document whose ID is elementId.

Syntax

node.getElementById(elementId)

Examples

1

2

Internal

getElementsByClassName

getElementsByTagName

getElementsByTagNameNS

External

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu