I want mack a mask input for time(01:55) without use plugin,as only accept to user typed four number, (i mean, when user type number 01 put after it this : and next user type 55), how is it?
This is my code that not work:
<input name="text" class="time">
$('.time').live('keyup change',function(){
this.value = this.value.replace(^[0-1]?[0-9]{1}:[0-5]{1}[0-9]{1}, "")
});
Here is full code: http://jsfiddl开发者_如何学Ce.net/yGLsH/
加载中,请稍侯......
精彩评论