<input name="test" type="text"> <script> document.querySelector("input[name=test]").value = "Hello, World!"; </script>