开发者

input password field->replace bullets with images

开发者 https://www.devze.com 2023-03-25 06:12 出处:网络
I need to replace the bullets in an <input type=\"password\"> field with any image (the same for all bullets). Can this 开发者_JAVA百科be achieved using CSS or JavaScript?Right. I\'ve had a nood

I need to replace the bullets in an <input type="password"> field with any image (the same for all bullets). Can this 开发者_JAVA百科be achieved using CSS or JavaScript?


Right. I've had a noodle on JSFiddle and I've come up with http://jsfiddle.net/jamwaffles/SzuD4/.

It's far from perfect, but it's a starting point. Basically, you need to position a div over the input. When the div is clicked, jQuery (sorry, but it's still JavaScript) will focus the input, making it typeable.


The only way to alter the password masking is with js but do you really want to rely on js enabled for a password field? Probably not...

Similar thread here: <input type="password" ...> styling with jQuery

0

精彩评论

暂无评论...
验证码 换一张
取 消