$(".numericOnly").keypress(function (e) { if (key === 9 ) { //TAB was pressed return false;} if (String.fromCharCode(e.keyCode).match(/[^0-9]/g)) return false; } });
<script>function checkInput(ob) { var invalidChars = /[^0-9]/gi if(invalidChars.test(ob.value)) { ob.value = ob.value.replace(invalidChars,""); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)