The best way is using regular expressions.
Example ↓
<script type="text/javascript"> function isValidEmail(email) { var regex_pattern = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; return regex_pattern.test(email); } </script>
Also you can use some another reg.exps:
Continue reading How to validate email address in JavaScript?