Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions Gruntfile.js

This file was deleted.

62 changes: 57 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,61 @@
<!DOCTYPE html>
<html>
<head>
<title>So-and-so's Stateful Assignment</title>
</head>
<body>
YOUR PROJECT HERE
</body>
<title>Eunice's Stateful Assignment </title>

<style>
h1, p{
text-align:center;
}

</style>

<h1> Register Board </h1>

</head>
<body>
<style>
form, input{
text-align:center;
}

</style>
<form action="tryjs_submitpage.htm" onsubmit="return myFunction()">
Name (max 10 characters) <br>
<input type="text" id="fname" size="20"><br>
Age (from 1 to 100) <br>
<input type="text" id="age" size="20"><br>
E-mail <br>
<input type="text" id="email" size="20"><br>
<br>
<input type="submit" value="Submit">
</form>

<script>

function myFunction() {
var at = document.getElementById("email").value.indexOf("@");
var age = document.getElementById("age").value;
var fname = document.getElementById("fname").value;
submitOK = "true";

if (fname.length>10) {
alert("The name may have no more than 10 characters");
submitOK = "false";
}
if (isNaN(age)||age<1||age>100) {
alert("The age must be a number between 1 and 100");
submitOK = "false";
}
if (at==-1) {
alert("Not a valid e-mail!");
submitOK = "false";
}
if (submitOK=="false") {
return false;
}
}
</script>

</body>
</html>
12 changes: 0 additions & 12 deletions package.json

This file was deleted.