+ 2
Error with addEventListener
the function of my addEventListener run alone ???? btnUn.addEventListener('click', fctGood (error, good, q, i, rUn, rDeux, rTrois, rQuatre, rGood) ); I think we should remove the paranthèse but i need then to keep the variable ??? Could you help me ?
1 Respuesta
+ 7
Use bind function to bind the parameters
btnUn.addEventListener('click', fctGood.bind(null, error, good, q, i, rUn, rDeux, rTrois, rQuatre, rGood) );
PS. Please set the proper relavent title of this question