So I have a homework assignment that I have completed. But I can not get the email address to test correctly. From what I can tell everything is correct.
<!DOCTYPE html>
<html>
<head>
<title>Lab 5, Part 3</title>
<script>
function validate()
{
var email = document.forms["form1"]["email"].value;
var emailValidator = "/^\w+([\.-]?\w+)+@\w+([\.:]?\w+)+(\.[a-zA-Z0-9]{2,3})+$/";
if (!email.match(emailValidator))
{
alert("Not a valid Email Address");
return false;
}
}
</script>
</head>
<body>
<h1 style="text-align:center">Lab 5, Part 3 for </h1>
<h2 style="text-align:center">IT 3203</h2>
<form name="form1" action="http://weblab.kennesaw.edu/formtest.php" onsubmit="return validate();" method="get">
<p> Email: <input type="text" id="email" name="email"></p>
<input type="Submit" value="Submit">
</form>
<p><a href=index.html>Back to Main Page</a></p>
</body>
</html>