I have this code
function isNumberKey(evt){
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
html command
onkeypress="return isNumberKey(event)"
I want to be able to type the minus sign in the input field. Please help. Thanks in advance.