Используйте HTML DOM, чтобы изменить значение поля ввода input.
<input type="text" id="myText" value="Привет">
<script>
document.getElementById("myText")@(6) = "Хорошего дня!";
</script>
<input type="text" id="myText" value="Привет">
<script>
document.getElementById("myText").value = "Хорошего дня!";
</script>