开发者

Input mask visibility

I'm currently using the masked input plugin from http://digitalbush.com/projects/masked-input-plugin/ on my form. So far it seems to work but I want to modify it so that the mask is displayed at all times and not just when the field is in focus. I was hoping I could just delete a line of code that hides the mask when the field loses focus but it doesn't seem tha开发者_如何学Ct easy. Does anyone know how to do this? Any help is appreciated. Thanks.


Since you know what the mask is ahead of time, you could always add html5 placeholder attributes to the selected inputs.

Something like

<input type="text" name="date" placeholder="__/__/____">

This would appear greyed out when the field is not focused but disappear when the field is focused.

See more on placeholder text here http://diveintohtml5.ep.io/detect.html#input-placeholder

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜