Here you can find a number of examples on Java Script.Please find the various kinds of examples listed on the right side of this site. If you don't find anything on Java Script then please write to us or leave a commnet. We are pleased to help and find the solution of your problem.

JavaScript: Validation on Email address



Example:
<html>
<head>
<title>Validation on email Address</title>
<script language="javascript">
function check()
{
var email=document.f1.email.value;
if(f1.email.value=="")
alert("Please enter Email address");
else
if(email.indexOf("@")==-1)
alert("Missing '@' in Email address");
else
if(email.indexOf(".")==-1)
alert("Missing '.' in Email address");}
</script>
</head>
<body>
<form name="f1">
Enter Email Address: <input type="text" name="email">
<input type="button" value="Submit" name="b1" onclick="check()">
</form>
</body>
</html>

No comments:

Post a Comment

Google