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
精彩评论