Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

myFunction with param on addEventListner

var someVar = 32;//Sample value 
var someEle = document.getElementById("someID");//Sample Element
someEle.addEventListener("click", function(){
   myFunction(someVar);// <- There use your function with param in brackets
}, false);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #myFunction #param #addEventListner
ADD COMMENT
Topic
Name
7+4 =