-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform1.html
More file actions
28 lines (24 loc) · 867 Bytes
/
form1.html
File metadata and controls
28 lines (24 loc) · 867 Bytes
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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="author" content="Adolfo Barrientos">
<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);" name="" id="">
<p id="email">
</p>
</form>
</body>
</html>