+ 1
why I'm getting this error in js console... in where other editor can play this without error.. but solorlearn is giving me erro
JavaScript Console Uncaught TypeError: Cannot read property 'addEventListener' of null Line: 9Uncaught TypeError: Cannot read property 'style' of null Line: 12 link of my code is here: https://code.sololearn.com/W4CABL65B7ch/#js
6 Respuestas
+ 3
add your js code in this function
window.onload=function(){
all js code goes here
}
You can read about it on net, what it does and search for similar answers
+ 3
Probably this helps ,it shows the support for different browser ,scroll to the bottom
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
+ 2
probably that might be the reason
0
Abhay thanks for your answer;;; but it doesn't work.. I am contually getting the error..
0
well, that is the reason may be;
The addEventListener() method is not supported in Internet Explorer 8 and earlier versions.
0
Thanks bro.. I have looked it... but can't get anything of it...
so much text for a simple explanation...