Quote Originally Posted by Nov?thor View Post
Code: 
 <html>
<head>
<script type="text/javascript">
function CheckMyEmail()
{
var x=document.forms["myForm"]["email"].value;
var value=("BC102034568");
var at=x.indexOf("@");
var dot=x.lastIndexOf("vu.edu.pk");
if (at<1 || dot<at+1 || dot+2>=x.length)
{
alert("This is Not your valid VU e-mail address");
return false;
}
else
{
    if(x="BC102034568@vu.edu.pk")
        {
        alert("This is your valid VU e-mail address");
        }
}
}
</script>
</head>

<body>
<form name="myForm" action="example.html" onsubmit="return CheckMyEmail();" method="post">
Email: <input type="text" name="email">
<input type="submit" value="Submit">
</form>
</body>

</html>
Thanks buddy but when i put xyz@vu.edu.pk it show me valid address. i only wanna make BC102034568@vu.edu.pk valid address all other values and email address must be show invalid.