change the type of input element in javascript completely code example
Example: setting the type of an input in js
myInput.type = "text"; //or "button" or "password" etc.
myInput.type = "text"; //or "button" or "password" etc.