4 ms·
Just put a "show password" checkbox next to it and use javascript to change the input field type from password to text.
by dugmartin 17y ago
Just put a "show password" checkbox next to it and use javascript to change the input field type from password to text.
- benhoyt 17y agoYeah, that'd probably be a one-liner JavaScript. Something like: onclick="getElementById('pwd').type='text';" But you'd want a bit more to toggle it. Still, maybe a slightly better way -- and a way to address the security issue at the same time -- would be to show the password when you hover over the field with your mouse. Is there a way to do this easily with JS?
- dugmartin 17y agoYou can do it in jQuery very easily. Give your password field the id of "hover-password" and add the following jQuery snippet: $(function() { $("#hover-password").hover( function() { this.type = "text"; }, function() { this.type = "password"; } ); });