Please visit DEMANDDRAFT.SHOP for quality of products...

Ad

Search This Blog

Wednesday, April 10, 2013

Email Validation using Javascript with Dotnet

 var emailPat = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
 var emailid=document.getElementById("ctl00$ContentPlaceHolder1$txtEmail").value;
 var matchArray = emailid.match(emailPat);
 if(matchArray == null)
 {
      alert("Please Enter Propoer EmailID");
      document.getElementById('ctl00$ContentPlaceHolder1$txtEmail').focus();
      return false;
  }

No comments:

Post a Comment