Check user email address forms to make sure they are valid using JavaScript before saving their info. The JavaScript code is provided here.
The function below checks if the content has the general syntax of an email.
This means that the input data must contain at least an @ sign and a dot (.). Also, the @ must not be the first character of the email address, and the last dot must at least be one character after the @ sign:
<script language="Javascript"> function checksubmit() { apos=document.add_data.email.value.indexOf("@") dotpos=document.add_data.email.value.lastIndexOf(".") if (document.add_data.email.value == "" || apos<1 || dotpos-apos<2) { alert("Please fix: email") document.add_data.email.focus() return false } return true } </script>
Please rate this post by clicking a star:

