Best Jquery ,javascript, HTML5 CSS3 tutorial with jquery examples, php script , demos for beginners, web designers and web developers.


Jquery Training

Jquery training blog

Email validation

<html> <head> <title>Email validation </title> <script src=””></script> </head> <body> HTML 5 validation <form name=”html5valid” method=”post” action=”#”> <input type=”email” name=”email”/> <input type=”submit” name=”submit”/> </form> Pure Javascript and jquery onclick validation</br> <input type=”text” name=”email” id=”email”> <button type=’button’ id=’validate’>Javascript Validation</button> <button type=’button’ id=’jquery_validate’>Jquery Validation</button> <h2 id=’result’></h2> <script> function validateEmailAddress(email) { var re = /^(([^<>()\[\]\\.,;:\[email protected]”]+(\.[^<>()\[\]\\.,;:\[email protected]”]+)*)|(“.+”))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } function Continue Reading

<title>Email validation </title>
<script src=""></script>
HTML 5 validation
<form name="html5valid" method="post" action="#">
<input type="email" name="email"/>
<input type="submit" name="submit"/>

Pure Javascript and jquery onclick validation</br>

<input type="text" name="email" id="email">

<button type='button' id='validate'>Javascript Validation</button>

<button type='button' id='jquery_validate'>Jquery Validation</button>

<h2 id='result'></h2>

function validateEmailAddress(email) {
var re = /^(([^<>()\[\]\\.,;:\[email protected]"]+(\.[^<>()\[\]\\.,;:\[email protected]"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);

function validateEmail() {
var email = document.getElementById('email').value;
if (validateEmailAddress(email)) {
document.getElementById('result').innerHTML=email + " is valid ";
} else {
document.getElementById('result').innerHTML=email + " is not valid ";
return false;

document.getElementById('validate').addEventListener('click', function() {


function validate() {
var email = $("#email").val();
if (validateEmailAddress(email)) {
$("#result").text(email + " is valid ");
$("#result").css("color", "green");
} else {
$("#result").text(email + " is not valid ");
$("#result").css("color", "red");
return false;
$("#jquery_validate").bind("click", validate);


Please follow and like us:

About the author

Joydeb Choudhury holds a Master's degree in Computer Application from I.G.N.O.U. After working as a web developer in various companies he has started bloging in 2016.

Recent Posts of blog

Downalod Free Php Scripts