Javascripts > Javascript Forms > Email Address Validation Script
Script Title: Email Address Validation Script
Description: Scan email addresses to make sure that the email address entered into the textbox contains valid characters.
Example: Available
Copy the following code into your <HEAD></HEAD> tags.<script language="JavaScript1.2"> /* Advanced Email Check By Website Abstraction (http://www.wsabstract.com) and Java-Scripts.net (http://www.java-scripts.net) Over 200+ free scripts here! */ var testresults function checkemail(){ var str=document.validation.emailcheck.value var filter=/^.+@.+\..{2,3}$/ if (filter.test(str)) testresults=true else { alert("Please input a valid email address!") testresults=false } return (testresults) } </script> <script> function checkbae(){ if (document.layers||document.all) return checkemail() else return true } </script>
Copy the following code between the <BODY></BODY> tags of your html page.<form name="validation" onSubmit="return checkbae()"> Please input a valid email address:<br> <input type="text" size=18 name="emailcheck"> <input type="submit" value="Submit"> </form>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email