Check out example codes for "get element by id html". It will help you in understanding the concepts better.

Code Example 1

document.getElementById("some_id");

Code Example 2

var myElement=document.getElementById("someElementID");

Code Example 3

document.getElementById("demo");

Learn ReactJs, React Native from akashmittal.com