document element by id = function code example
Example 1: javascript get element by id
var element = document.getElementById("YourElementId");
Example 2: get document by id
var element = document.getElementById(id);
var element = document.getElementById("YourElementId");
var element = document.getElementById(id);