javascript update input value by id code example
Example 1: javascript set input field value
document.getElementById("myInputID").value = "My Value"; //set value on myInputID
Example 2: get value from textbox in vanilla javascript
document.getElementById("myText").value = "Johnny Bravo";