How to validate Email Address Using Javascript

<script language=”javascript” type=”text/javascript”>
function checkemail(id) {
var email = document.getElementById(id);
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
alert(‘Please provide a valid email address’);
email.focus;
return false;
}
return true;
}
</script>

About

me : yeay its me arun

Tagged with: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.