Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

listener to multiple elements

[ Element1, Element2 ].forEach(function(element) {
   element.addEventListener("input", function() {
      this function does stuff
   });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #listener #multiple #elements
ADD COMMENT
Topic
Name
5+4 =