大佬教程收集整理的这篇文章主要介绍了使用jquery输入时间掩码,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这该怎么做.
编辑:我还需要将am / pm放在掩码中.我需要12小时的时间格式.
这可能是一个开始?
如果查看代码,我认为你应该传递setMask一个options对象.看起来DefaultValue是一个可能的选择.
看起来以下应该可以工作(但它没有):
$("#txtTime").setMask({mask: "time",DefaultValue:"hh:mm"});
这就是我所看到的:
$.fn.extend({ setMask : function(options){ return $.mask.set(this,options); },
和
// default setTings for the plugin options : { attr: 'alt',// an attr to look for the mask name or the mask itself mask: null,// the mask to be used on the input type: 'fixed',// the mask of this mask maxLength: -1,// the maxLength of the mask DefaultValue: '',// the default value for this input
以上是大佬教程为你收集整理的使用jquery输入时间掩码全部内容,希望文章能够帮你解决使用jquery输入时间掩码所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。