Cannot read property (name of it) of null | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Cannot read property (name of it) of null

Please someone tells me why i get this kind of error

16th Sep 2020, 8:56 AM
Djaber Meghar
Djaber Meghar - avatar
3 Answers
+ 8
Use window.onload=function(){ Correct js code }
16th Sep 2020, 9:02 AM
TOLUENE
TOLUENE - avatar
+ 4
Try this window.onload = () => { // JS code }
16th Sep 2020, 9:06 AM
Kayla Onobun (QOG)
Kayla Onobun (QOG) - avatar
+ 3
try with this put your js code of js section as document.onload = ()=>{ // put your js code here }
16th Sep 2020, 9:04 AM
Divya Mohan
Divya Mohan - avatar