Reputation: 1543
Let's say I have this
Name : <input type="text" name="name" />
I want to mask the user input with password sign either like asterix or dot. Is it possible to do this?
Yes, I know I could do Password : <input type="password" />
but I want to do with input type="text"
. Is it possible?
Thank you
Upvotes: 0
Views: 1145
Reputation:
if you don't want to use input type="password".use javascript keyup function and make a custom replace function
Upvotes: 0
Reputation: 157334
I don't know why you want to do this as we have type="password"
but still if you want to hide the fields which have type="text"
than you can use this (Only webkit)
input[type="text"] {
-webkit-text-security: disc;
}
Demo (Webkit Only)
Upvotes: 2
Reputation: 3984
Just change the type to password.
Name : <input type="password" name="name" />
Upvotes: 0