Tuesday, January 26, 2010

Allow only numbers/digits in TextBox


<HTML>
<HEAD>
<SCRIPT language=Javascript>

function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode <> 57))
return false;

return true;
}