Skip to content

Commit 45fda64

Browse files
committed
update
1 parent f398d12 commit 45fda64

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<h2>Input Field Change Listener</h2>
99

1010
<input type="number" id="myInput" placeholder="Type something...">
11+
<label for="displayText">Output: </label>
1112
<p id="displayText"></p>
1213

1314
<script src="index.js"></script>

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ var displayText = document.getElementById('displayText');
55
// Add the event listener
66
inputField.addEventListener('input', function(event) {
77
// Update the displayText content with the input field value
8-
displayText.textContent = 'Input changed to: ' + event.target.value;
8+
displayText.textContent = event.target.value;
99
});

style.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
input {
22
text-align: right;
3+
box-shadow: bisque;
34
}
45
h2 {
5-
text-align: center;
6+
background-color: aqua;
67
}

0 commit comments

Comments
 (0)