+ 1
Why my code(above) is not supported in SoloLearn? But it works on Microsoft edge and other browsers.
9 Réponses
0
For the loading issue we can control it by two methods
1)create onload attribute to body element
2)use windows.onload event
These are pointed in Solo Learn app.
Java script->DOM & events->Handling events.
+ 4
marina enclose your Chang variable in a window.onload function😉
+ 2
I think sololearn web is not exactly like a fully functional browser. Try to use an onload event attribute on you body tag, and to run all the js code inside a function that you call from the onload event.
it works for me fine like that :)
+ 1
The problem is it runs before body is loaded so the getElementById returns null. I use a onload attribute to my body tags to avoid that problem.
+ 1
Thanks for all answers ☺
+ 1
Thanks for your explanation @John Wells ☺
+ 1
Thanks also @Uria ☺ ☺
+ 1
Above code was deleted mistakenly...Sorry for inconvenience.Bt modified one is saved in my codes which is inserted with window.onload function