const input = document.querySelector('input');
const log = document.getElementById('log');
input.addEventListener('change', updateValue);
function updateValue() {
log.textContent = target.value;
}
const input = document.querySelector('input')
input.addEventListener('change', (e) => {
console.log(e.target.value);
});
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />
<input type="text" name="name" value="" />