For you to select an HTML element in JavaScript, seven your field with an ID, if you use it once, as done in your code:
<input type="text" id="myText" value="Mudar aqui">
In this case, your ID is "myText".
In JavaScript, you need to get this data and set it, just like @DVD did in the previous answer, but who does this for you is:
document.getElementById("AQUI VAI O SEU ID");
When you place the .value after this code, you are getting the value of your input field. You can pick up other parameters, as I'll give you some examples below:
Change the class parameter:
document.getElementById("myText").class = "Pedro Brigatto";
Change the id parameter:
document.getElementById("myText").id = "Pedro Brigatto";
I hope I have contributed to your knowledge! :)