+ 3

How to set password echo char as * instead of ● in html form field?

I want to display password as * when entered in html form field. How to make that?

28th May 2017, 2:14 PM
Manchukonda Manoj
Manchukonda Manoj - avatar
14 Answers
+ 8
It's web client-specific, you can try to enforce it so that it looks the same in every browser, but no 100% guarantee. Take a look at this SO thread: https://stackoverflow.com/questions/6859727/styling-password-fields-in-css
28th May 2017, 2:24 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 8
Another way to do it is to write custom password input with no <input> element but <div> ( or any other one ), handling yourself output and storing characterd typed by user on a virtual keyboard, with the advantage of avoiding eventual key logger hack... Example of such implementation easily adaptable: https://code.sololearn.com/W4Qam61Iz8V3/?ref=app
28th May 2017, 7:30 PM
visph
visph - avatar
+ 7
ughhhh....my research led me to that exact same page that Kuba provided.
28th May 2017, 2:34 PM
Burey
Burey - avatar
28th May 2017, 2:39 PM
Burey
Burey - avatar
+ 7
omg..... i was aware of such solution but was afraid to suggest because of the complexity of writing an entire virtual keyboard.... kudos vishp kudos 👏👏👏
28th May 2017, 7:32 PM
Burey
Burey - avatar
+ 6
<input type="password" />
28th May 2017, 2:15 PM
Burey
Burey - avatar
+ 6
yeah....my bad xD didn't read question right brb
28th May 2017, 2:18 PM
Burey
Burey - avatar
+ 5
np :)
28th May 2017, 2:53 PM
Burey
Burey - avatar
+ 5
@Burey: Thanks :) I'm proud to impress a good coder like you ;)
28th May 2017, 8:07 PM
visph
visph - avatar
+ 5
for the love of god Manchunkonda give vishp best answer already 😂
28th May 2017, 8:14 PM
Burey
Burey - avatar
+ 4
Wow, @visph at his best! :)
28th May 2017, 8:08 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
Thank you Kuba & Burey..
28th May 2017, 2:51 PM
Manchukonda Manoj
Manchukonda Manoj - avatar
+ 2
that is awesome vishp
29th May 2017, 1:59 AM
Jubbs
Jubbs - avatar
+ 1
@Burey.. when we use that our password is displayed ● but, I wanted to display as * When password is entered..
28th May 2017, 2:16 PM
Manchukonda Manoj
Manchukonda Manoj - avatar