Tuesday, May 12, 2015

Allow Only Integer In TextBox Validation JavaScript

Are you looking for the JavaScript Code to Allow Only Integer In Textbox then this code will surely help you to validate the keypress in Textbox to allow only integer values.


JavaScript Code:


function isNumber(evt) 
    {
    evt = (evt) ? evt : window.event;
    var charCode = (evt.which) ? evt.which : evt.keyCode;
    if (charCode > 31 && (charCode < 48 || charCode > 57)) 
    {
      return false;
     }
      return true;
     }

No comments :

Post a Comment