selvi subramanian

selvi subramanian

  • NA
  • 799
  • 574.6k

i need to throw error in java script

Sep 8 2012 1:24 AM


i need output like this [email protected]


















 var eml=document.getElementById('ctl00_ContentPlaceHolder3_textemail').value;
    if(eml=="")
      {
                 alert("Email id can not be blank");
                
                return false;
      }
     var emailPat = /^(\".*\"|[A-Za-z]\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
     var emailid=document.getElementById('ctl00_ContentPlaceHolder3_textemail').value;
     var matchArray = emailid.match(emailPat);
     if (matchArray == null)
    {
               alert("Your email address seems incorrect. Please try again.");
               
               return false;
    }




















Answers (1)