+ 2
onclick & function
Why "y.onclick=function cfr()" not working? Am I not correctly calling the function? https://code.sololearn.com/WaW0uMFEgKb1/?ref=app
3 ответов
+ 2
Use
y.addEventListener("click",cfr);
or
y.onclick=cfr;
instead of
y.onclick=cfr();
+ 1
thank you, Mohammed!
+ 1
You're welcome, Илья