/ Published in: PHP
This is a script for a validating Email.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
---------------------------------------------------------------------------------------------- function callEmailCheck() { 2 var emailreg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; 3 //useremail is the name of the email text field. 4 var email = document.getElementById("useremail").value; 5 if(emailreg.test(email) == true){ 6 return email; 7 } 8 return ""; 9 } -----------------------------------------------------------------------------------------------
URL: http://katharnavas.wordpress.com/2009/10/20/email-validation-using-php-and-javascript/