Menu Home

getElementById

osbo.com | JS | getElementById

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

Syntax

document.getElementById(elementId)

Examples

Internal

getElementsByClassName

getElementsByTagName

getElementsByTagNameNS

External

Web Hypertext Application Technology Working Group (WHATWG)