+ 1
Why it shows me this eror
It show cannot set style of null https://code.sololearn.com/WoNsE17D7kG8/?ref=app
2 Respuestas
+ 2
Codes on JS tag are placed on HTML head tag and hence the code runs before dom loads.
Place your script on body tag or use:
window.onload = function(){
//Your code here
}
Use the search bar next time. This question is faq:
https://www.sololearn.com/Discuss?ordering=MostRecent&query=cannot%20null
+ 1
Thanks Kevin ★ .Solved