how to set the value to input field using name in javascript code example
Example: javascript assign value to input using name
document.querySelector('input[name="myInput"]').value = 'Whatever you want!';
document.querySelector('input[name="myInput"]').value = 'Whatever you want!';