getElementById() Method

getElementById() lets you bring back a specific element by its ID. You can then use getElementById() to change this element.
If no element exists with the ID you're trying to return, you'll get "null".

Syntax:

My Div


Other Div