0

This works in Chrome, but not in solo learn. Any help would be appreciated.

https://code.sololearn.com/WVsAY0G7kH0L/?ref=app

12th Sep 2017, 3:02 PM
Not Real
Not Real - avatar
3 odpowiedzi
+ 5
How about place your script inside <script> which is inside <body>?
12th Sep 2017, 3:05 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 1
What happens is that when the script runs, the html isn't loaded yet, so you gotta put all your code EXCEPT functions inside a function that is called then the document loads, example: // here your functions and vars onload = function() { // your code // vars related to the document } // here your functions and vars
12th Sep 2017, 3:14 PM
voidneo
0
Thanks for the help guys, first time posting code to solo learn :)
12th Sep 2017, 3:20 PM
Not Real
Not Real - avatar