+ 1
Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
why facing like this error message
2 Answers
+ 3
Can you share your code here? Save it on the code playground and share it's link here.
Most probably it's happening because you are trying to run your Javascript before the HTML has loaded. In this case, you can wrap your JavaScript code inside
window.onload=function(){
........
}
to solve this
+ 1
Rishi thank you for the response..