Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML: HTML5 Placeholder attribute in password field issue- shows normal text?

I am making a Login form, in which there are two fields-

simplified:

<input type="text">
<input type="password" placeholder="1234567" >

In my tests (FF, Chrome) the placeholer shows grey text. How can I have the placeholder text in password 'dots' ? And have placeholder support in IE?

eg. the user sees a fake grey password, not the text 1233467.

(I have jquery available)

Thankyou very much,

Harley

EDIT: Looks like this is the wrong way to use placeholder. However, how can I get IE support? Thanks

like image 506
harley_woop Avatar asked Jul 17 '12 13:07

harley_woop


1 Answers

Try using the password dot code in the placeholder like so:

placeholder="&#9679;&#9679;&#9679;&#9679;&#9679;"

For support in IE please refer to other threads such as Showing Placeholder text for password field in IE or placeholder works for text but not password box in IE/Firefox using this javascript

like image 72
Matt_Bro Avatar answered Oct 27 '22 01:10

Matt_Bro