-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.html
28 lines (23 loc) · 810 Bytes
/
form.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Brandon Monroe">
<title>My first form</title>
<script>
function generateEmail(form){
document.getElementById("email").innerHTML = form.elements["first"].value + "." + form.elements["last"].value + "@atu.edu";
form.reset();
}
</script>
</head>
<body>
<form>
First Name: <input type="text" id="first" placeholder="Enter your first name" size="15" autofocus> <br>
Last Name: <input type="text" id="last" placeholder="Enter your last name" size="15"> <br><br>
<input type="button" value="Generate Email" onclick="generateEmail(this.form);">
<p id="email">
</p>
</form>
</body>
</html>