-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
It is the resolution of problem
$(this).keypress(function (e) {
var k = e.charCode || e.keyCode || e.which;
var pos = $(this).caret();
if (!k){
return true;
}
var part1 = this.value.substring(0, pos.begin);
var part2 = this.value.substring(pos.end, this.value.length);
if (!mask.test(part1 + String.fromCharCode(k) + part2)){
return false;
}else{
return true;
}
});
Metadata
Metadata
Assignees
Labels
No labels