Email Address Validate : Form Validation : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Form Validation »

 

Email Address Validate



<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--

function validateEmail(){
 var email_add=window.prompt("What is your e-mail address?","");
 if (email_add.indexOf("@"== -1) {
    window.alert("You need an '@' symbol in your address, please try again.");
 }
 
 if (email_add.indexOf("."== -1){
    window.alert("You need a '.' symbol in your address, please try again.");
 }
 
 if ( (email_add.indexOf("@"!= -1&& (email_add.indexOf("."!= -1) ){
    window.alert("Thanks!");
 }
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT type="button" value="Click to enter an e-mail address" onClick="validateEmail();">
</BODY>

</HTML>

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Form Validation