Why it shows me this eror | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1
28th Oct 2020, 5:12 AM
Çrèàtìvè Sàt
Çrèàtìvè Sàt - avatar
2 ответов
+ 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
28th Oct 2020, 5:30 AM
Kevin ★
+ 1
Thanks Kevin ★ .Solved
28th Oct 2020, 5:35 AM
Çrèàtìvè Sàt
Çrèàtìvè Sàt - avatar