Validate Email Address
$(document).ready(function() {
$('#txtEmail').blur(function() {
if(validateEmail('txtEmail'))
{
alert('Email is valid');
}
else
{
alert('Invalid Email Address');
}
});
});
function validateEmail(txtEmail){
var a = document.getElementById(txtEmail).value;
var filter = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{0,4}$/;
if(filter.test(a)){
return true;
}
else{
return false;
}
}