-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (46 loc) · 1.16 KB
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Lab 6 - Basic JavaScript Event Handling and DOM</title>
<style type="text/css">
.center {
text-align: center;
}
#container {
width: 400px;
margin: 50px auto 0;
}
#entryinput {
width: 100%;
}
#entrybutton {
width: 200px;
text-align: center;
color: #fff;
background-color: #c00;
padding: 2em 0;
margin: 20px auto;
font-size: 24px;
font-weight: bold;
}
</style>
</head>
<body>
<h1 class="center">ITMD-361 - Lab 6 - Basic JavaScript Event Handling and DOM</h1>
<h2 class="center">Thomas Boller</h2>
<h3 class="center">tboller@hawk.iit.edu</h3>
<div id="container">
<input id="entryinput" type="text" name="textentry" placeholder="Enter a Message">
<div id="entrybutton">Alert Me</div>
<h2 id="textoutput" class="center">Show results here</h2>
</div>
<script type="text/javascript">
document.getElementById("entrybutton").addEventListener("click", function() {
var resp = document.getElementById("entryinput").value;
document.getElementById("textoutput").innerHTML = resp;
alert("Thomas Boller: " + resp);
})
</script>
</body>
</html>