Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js create events in for always gets last id

button.addEventListener("click", function(index) {
      return function(){
        console.log(index)
      }
    }(i))
Source by softauthor.com #
 
PREVIOUS NEXT
Tagged: #js #create #events #id
ADD COMMENT
Topic
Name
9+2 =