posted 15 years ago
hello ,i am using javascript in cgi-perl for popup alert and now in pop alert i am doing number checking for user input using regular expression ,
i am try to do this thing by two ways but still is not working .please help me out.
function numcheck()
{
var myForm = document.add_quiz;
var message = '';
var num=/^[0-9]+$/;
if(myForm.marks.value.match(myForm.marks.value.num)) or if(myForm.marks.value != myForm.marks.value.num)
{
alert('Please enter digit');
return(false);
}
else
{
return(true);
}
}