Function isDigit ()
{
return((event . key code & gt; = 48)& amp; & amp(event.keyCode & lt= 57));
}
& lt/script & gt;
& ltinput type = " text " name = " aa " onkey press = " event . return value = is digit()" & gt;