document get main element code example
Example 1: javascript get element by id
var element = document.getElementById("YourElementId");
Example 2: Finding HTML Element by Id
var myElement = document.getElementById("intro");
var element = document.getElementById("YourElementId");
var myElement = document.getElementById("intro");