getElementById() Method
The getElementById() method returns the element that has the ID attribute with the specified value. This method is one of the most common methods in the HTML DOM and is used almost every time you want to manipulate or get info from, an element on your document.
Syntax
document.getElementById(elementID)
Example: 1
Example: 2