Valdate Textbox to accept only Digits using Javascript.
Use this function on "keyup" event of Textbox.
Javascript:
function isDigit(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 47 && charCode < 58)
{
return true;
}
else
{
return false;
}
}aspx:
asp:textbox id="TextBox1" onkeyup="return isDigit(event)" runat="server" width="238px"
No comments:
Post a Comment