inputType change at runtime


Is it possible to change the input type of a text box at runtime?



For jQM:
$("#TextBox1").attr("type", "password")

For Bootstrap:
$("#Input1 input").attr("type", "password")

Be aware of potential impact the change may have on other attributes if originally deployed with them (e.g. min and max attributes wouldn’t work if the type is changed from "number" to "text").

Kind regards,


It’s great thank you very much.