function isNumberKey(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
<asp:TextBox ID="txtPinCode" runat="server" ClientIDMode="Static"
onkeypress="return isNumberKey(event)" MaxLength="13" />
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
<asp:TextBox ID="txtPinCode" runat="server" ClientIDMode="Static"
onkeypress="return isNumberKey(event)" MaxLength="13" />
No comments:
Post a Comment