How do you make sure an entry is a number using JavaScript?
I need to make sure only a number is entered. I have validation working for when nothing is entered and need to build on that
(inside form)
<td><b>Age:</b></td>
<td><input name="age" size ="4" maxlength="2"></td>
(inside script section of head)
if (myform.age.value=="")
{
alert("No Age Entered");
myform.age.focus();
return false;
}
Thanks
|