get document by id value code example
Example 1: javascript get element by id
var element = document.getElementById("YourElementId");
Example 2: js getelementbyid
document.getElementById("some_id");
Example 3: get value from textbox in vanilla javascript
document.getElementById("myText").value = "Johnny Bravo";
Example 4: get document by id
var element = document.getElementById(id);