<Script Type = "Javascript">
function numbersonly(e)
{
//alert('hi');
var unicode=e.charCode? e.charCode : e.keyCode;
if (unicode!=8 && unicode!=46 && unicode!=9)
{
if (unicode<48||unicode>57)
return false
}
}
How to access
<asp:TextBox ID="TextBox1" runat="server" onkeypress="return numbersonly(event);"></asp:TextBox>
No comments:
Post a Comment