AddEventListener does not work trite | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

AddEventListener does not work trite

All browsers work fine, I don’t understand why sl does it. For some reason, the js code was loaded earlier in sl, so I used Window.onload, but still addeventlistener returned null, I tried to run the code later through the event handler, but it still doesn’t work. It starts to anger me that I can't do an easy action. I already think maybe I just don't see any other simple mistake. If so please dont throw tomatoes at me. https://code.sololearn.com/WU0CPb2PtGLI/?ref=app

18th Aug 2019, 3:26 PM
Chill Dealer
Chill Dealer - avatar
2 Answers
+ 6
You have typos key instead of keg (HTML tab) xcl instead of xlc (JS tab)
18th Aug 2019, 3:32 PM
Burey
Burey - avatar
0
Oh thanks. My attentiveness in the trash
18th Aug 2019, 3:41 PM
Chill Dealer
Chill Dealer - avatar