0

Is says TypeError: Cannot Set property 'onclick' of null. How do i fix it?

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

14th May 2020, 11:45 PM
Josh Zaphyrr
Josh Zaphyrr - avatar
2 Answers
+ 1
Move content1 and button1 inside the window.onload function. Then you also have an error with the last JS line where the variable name is button instead of button1.
14th May 2020, 11:57 PM
ChaoticDawg
ChaoticDawg - avatar
0
window.onload=function(){ Js code goes here } Please search for similar questions
14th May 2020, 11:47 PM
Abhay
Abhay - avatar