var emailexp = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
Usage
if(document.getElementById(FinalControlID10).value.trim() =="")
{
alert("Please enter Email Address.");
document.getElementById(FinalControlID10).focus();
return false;
}
else if(emailexp.test(document.getElementById(FinalControlID10).value.trim()) == 0)
{
alert("Please enter a valid Email Address.");
document.getElementById(FinalControlID10).focus();
return false;
}
Monday, June 2, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment