<form> <input name="algo" type="password" /> <input type="button" onclick="algo.type='text'" /> </form>