Good morning,
I facing a issue on the IE 10 where my keypress still can enter '%' but the FF and Chrome no such issue. I found out that the key 37 is the [ left arrow ] which match with '%' in ASCII. My sample code as below:
$('#refId').bind("keypress", function(event) {
// allow letters, numbers and keypad numbers ONLY
var key = event.charCode;
if((key >= 48 && key <= 57) ||
(key >= 65 && key <= 90) ||
(key >= 97 && key <= 122)){
return true;
}
//allow backspace, tab, left arrows, right arrow, delete
key = event.keyCode;
if(key == 8 ||
key == 9 ||
key == 37 ||
key == 39 ||
key == 46){
return true;
}
return false;
});
Can give me some idea how to fix this?
Thanks. -fsloke