input type change code example
Example 1: setting the type of an input in js
myInput.type = "text"; //or "button" or "password" etc.
Example 2: javascript input value change
function updateInput(ish){
document.getElementById("fieldname").value = ish;
}