js change text in input code example
Example 1: javascript set input field value
document.getElementById("myInputID").value = "My Value"; //set value on myInputID
Example 2: setting the type of an input in js
myInput.type = "text"; //or "button" or "password" etc.