151
rated 0 times
[
152]
[
1]
/ answers: 1 / hits: 16036
/ 12 Years ago, wed, june 20, 2012, 12:00:00
Possible Duplicate:
HTML Text Input allow only Numeric input
I used this script
function isNumberKey(evt)
{
var e = event || evt; // for trans-browser compatibility
var charCode = e.which || e.keyCode;
if (charCode > 31 && (charCode < 47 || charCode > 57))
return false;
if (e.shiftKey) return false;
return true;
}
But this script not working in firefox alone.
Any alternatives to restrict user for shift key in javascript?
More From » javascript