File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ var displayText = document.getElementById('displayText');
55// Add the event listener
66inputField . 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} ) ;
Original file line number Diff line number Diff line change 11input {
22 text-align : right;
3+ box-shadow : bisque;
34}
45h2 {
5- text-align : center ;
6+ background-color : aqua ;
67}
You can’t perform that action at this time.
0 commit comments