if((code >= 48 && code <= 57)||(code >= 97 && code <= 105)) { event.returnValue=true; return; }
if (/^[0-9]+$/.test(element.value)) { // Here you have only numeric stuff. You can check ranges and // so on... } else { element.value = 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)