Now we are going to explain all about email validation with the using of JavaScript also displaying few example see in the below section.
Here we are provide a code of function. which is the best example for validation.
function email_funnction() {
var email = document.emailform.email.value;
if(email.indexOf('@')<=0){
document.getElementById('errormsg').innerHTML="Invalid your Email Address";
return false;
}
if ((email.charAt(email.length-4)!='.') && (email.charAt(email.length-3)!='.')) {
document.getElementById('errormsg').innerHTML="Invalid your Email Address";
return false;
}
}
This is the function you can check and apply any form for email validation. So if you want more information and example with the html of Email Validation in JavaScript
Top comments (0)