<html>
<head>
<script type="text/javascript">
function validateForm()
{
var email=document.getElementById("email2").value;
var dotpos=email.lastIndexOf(".");
if (dotpos<1 || dotpos+1>=email.length)
{
alert("Not avilable domain.");
return false;
}
}
</script>
</head>
------------------------------------------------------------------------------------
<body>
<form name="myForm" action="demo_form.asp" onsubmit="return validateForm();" method="post">
E-MAIL <input type="text" name="email" id="email2">
<input type="submit" value="Submit">
</form>
</body>
</html>