Code: Select all
$('#practiceNPI').bind('keypress', function (e) {
var k = e.which;
var ok = k >= 48 && k <= 57 || k == 01//select
|| k == 0
|| k == 8
;
if (!ok) {
e.preventDefault();
}
});
By doing this every thing works well but the only ISSUE is with mozilla where i cant use keybord shortcut to copy paste or select
for ex:- try to copy paste in this field by ctrl+v or ctrl+c http://jsfiddle.net/lesson8/HkEuf/1/
Plz help.. want to use that function...Thx in Adv..