It's not working!! | Sololearn: Learn to code for FREE!
0

It's not working!!

Can somebody pls help me, this is not working that I worked so hard https://sololearn.com/compiler-playground/W2GkC9b6ZB9c/?ref=app

25th Jun 2024, 9:34 AM
Habeeb Muhammad
Habeeb Muhammad - avatar
2 Antworten
+ 3
it's because your js runs before the html is loaded. modify your js so it's inside an onload function. This will make sure your html is loaded before the javascript runs. Then it will be able to find the DOM elements. In the JS tab: onload = () => { //move all your js code here... }
25th Jun 2024, 10:19 AM
Bob_Li
Bob_Li - avatar
0
Thank you
27th Jun 2024, 4:10 AM
Habeeb Muhammad
Habeeb Muhammad - avatar