Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

input change event in javascript

const input = document.querySelector('input');
const log = document.getElementById('log');

input.addEventListener('change', updateValue);

function updateValue() {
  log.textContent = target.value;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #input #change #event #javascript
ADD COMMENT
Topic
Name
7+5 =