Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   <script>
  2.     const inputs = document.querySelectorAll('.controls input');
  3.     function handleUpdate(){
  4.       console.log(this.value);
  5.     }
  6.     inputs.forEach(input => input.addEventListener('change', handleUpdate));
  7.     console.log(inputs);
  8.   </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement