set input value by name javascript code example
Example 1: javascript set input field value
document.getElementById("myInputID").value = "My Value"; //set value on myInputID
Example 2: javascript assign value to input using name
document.querySelector('input[name="myInput"]').value = 'Whatever you want!';