Email Validation

Hariinakoti
Posted by Hariinakoti under JavaScript category on | Points: 40 | Views : 1143
function validateEmail(id)
{
if(document.getElementById(id).value!= )
{
var str=document.getElementById(id).value;
var filter=^([w-]+(.[w-]+))@(([w-]+.)w[w-]{0,66}).([a-z]{2,6}(.[a-z]{2}))$i;
if(filter.test(str))
{

}
else
{
alert(Please Enter Valid EmailId);
document.getElementById(id).focus();
return false;
}

}
}

Comments or Responses

Posted by: Mani5155 on: 4/11/2012 Level:Starter | Status: [Member] | Points: 10
thank you

Login to post response