According to my title how to implement the onfocus
and onblur
to the password field? Default value is password (readable) and when we click the password field it will return to password format.
Here an example, I don't want to see "●●●●●●●●" but "Password" instead
<input type="password" name="password" value="password" onfocus="this.value=(this.value=='password') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'password' : this.value;" />
Update
Google result I found Change Input Type Dynamically but the code is too long. Maybe jquery can make it shorter.