Here is the script:
<script type=”text/javascript”>
$(document).ready(function(e){
$(‘#submit-id’).click(function(){
var email = $(‘#email-id’).val();
var reg = /^([\w-\.]+@(?!gmail.com)(?!yahoo.com)(?!hotmail.com)(?!yahoo.co.in)(?!aol.com)(?!abc.com)(?!xyz.com)(?!pqr.com)(?!rediffmail.com)(?!live.com)(?!outlook.com)(?!me.com)(?!msn.com)(?!ymail.com)([\w-]+\.)+[\w-]{2,4})?$/;
if (reg.test(email)){
return 0;
}
else{
alert(‘Please Enter Business Email Address’);
return false;
}
});
});
</script>
Sample HTML Form:
<form id=”yourid” action=”youraction” method=”POST/GET”>
<input type=”text” name=”email” id=”email-id”>
<input type=”submit” id=”submit-id” name=”download_submit” value=”Submit”>
</form>