New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Showing error with 'addEventListener' ! Please help where to fix the bug actually?
4 Answers
+ 2
window.onload=()=>{
// wrap js code
}
+ 2
Reason is the js file reading before the web page load, so.
You're welcome.
+ 1
I did it with the function() but it was not working though.. trying again as per your tip.. thanks
+ 1
Forgot to mention the "=" operator before the function().. anyways thanks