A bank with codes where u can deposit your knowledge and withdraw from my knowledge...
Saturday, 8 February 2014
javascript Email validation using regular Expression
<script>
var emailRegex = /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/;
var email=document.getElementById("email").value;
if(email.search(emailRegex)==-1) {
alert("You have entered an invalid email.");
return false;
}
No comments:
Post a Comment