get value from dom javascript code example
Example 1: javascript element read attribute
document.getElementById('id1').getAttribute('attribute');
Example 2: get value from textbox in vanilla javascript
document.getElementById("myText").value = "Johnny Bravo";