Monthly Archives: March 2017

Archive of posts published in the specified Month

Mar
20

Email Id validation in jquery

<script src=”https://code.jquery.com/jquery-1.11.3.js”></script> <script > function ValidateEmail(emailId) { var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; return expr.test(emailId); }; $(document).ready(function(){ $(“#submit “).click(function(){ var email = $(“#email”).val(); if(email == ”){ alert(“Please enter Email Id”); } else if (!ValidateEmail(email)) { alert(“Invalid email address”); } else { alert(“Valid Email id”); }…