输入掩码可见性
我目前正在使用 http://digitalbush.com/projects/masked- 中的屏蔽输入插件我的表单上的 input-plugin/ 。到目前为止,它似乎有效,但我想对其进行修改,以便始终显示蒙版,而不仅仅是在视野聚焦时显示。我希望我可以删除一行在字段失去焦点时隐藏遮罩的代码,但这似乎并不那么容易。有谁知道该怎么做?任何帮助表示赞赏。谢谢。
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 that easy. Does anyone know how to do this? Any help is appreciated. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您提前知道掩码是什么,因此您始终可以将 html5
placeholder
属性添加到选定的input
中。类似于
当字段不存在时,此字段将显示为灰色聚焦,但当场聚焦时消失。
在此处查看有关
占位符
文本的更多信息http://diveintohtml5.ep。 io/detect.html#input-placeholderSince you know what the mask is ahead of time, you could always add html5
placeholder
attributes to the selectedinput
s.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