jquery - Getting the masked value of a password field? -
i've got normal password field "get" masked value - yep, ugly **********
obfuscated value.
html:
<input type="password" name="password" value="" id="password"></input>
js/jq dom:
$("#password").val(); // password in cleartext
if mean want string contains *
number of characters inserted in password field do:
var password = $("#password").val(); password = password.replace(/./g, '*');
Comments
Post a Comment