Trying to check if an entry into my month field is
a valid entry. My problem is checking to make sure if a number is entered. If a letter is entered I want an alert error. Here is my attempt:
function checkdate(theform)
{
if(theform.month.value<1 || theform.month.value>12) || theform.month.value != \d)
{
alert("invalid month");
return false;
}
}
a valid entry. My problem is checking to make sure if a number is entered. If a letter is entered I want an alert error. Here is my attempt:
function checkdate(theform)
{
if(theform.month.value<1 || theform.month.value>12) || theform.month.value != \d)
{
alert("invalid month");
return false;
}
}