Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
.............................................
thankxxxxx
Posted
Comments
King Fisher 1-Apr-15 8:50am    
what?

try this :

C#
$(".numericOnly").keypress(function (e) {
 if (key === 9 ) { //TAB was pressed
     return false;}

    if (String.fromCharCode(e.keyCode).match(/[^0-9]/g)) return false;
}
});
 
Share this answer
 
Comments
Parazival 30-Mar-15 7:38am    
function CheckNumeric(e) {

if (window.event) // IE
{
if ((e.keyCode < 48 || e.keyCode > 57) & e.keyCode != 8) {
event.returnValue = false;
return false;

}
}
else { // Fire Fox
if ((e.which < 48 || e.which > 57) & e.which != 8 ) {
e.preventDefault();
return false;

}
}
}

this is my javascript how to write code for allow tab can u tell me thanksss
XML
<script>function checkInput(ob) {
  var invalidChars = /[^0-9]/gi
  if(invalidChars.test(ob.value)) {
            ob.value = ob.value.replace(invalidChars,"");
      }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900