-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (27 loc) · 848 Bytes
/
index.html
File metadata and controls
30 lines (27 loc) · 848 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
29
30
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h3>DOM Manipulation Template</h3>
<input class="starter" id="input" placeholder="input"/>
<h2>output:</h2>
<div class="starter" id="output"></div>
<script>
var display = function(data){
var displayElement = document.querySelector('#output');
// get rid of the entire contents
displayElement.innerHtml = "";
// put the data into the div
output.innerText = data;
}
document.querySelector('#input').addEventListener('change', function(event){
var currentInput = event.target.value;
var result = inputHappened(currentInput)
display( result );
});
</script>
<script src="script.js" charset="utf-8"></script>
</body>
</html>