+ 1
Add event listener using Javascript problem
I'm trying to use addEventListener function but I'm having the problem that the page is not fully loaded yet so it can't find the invoked html tags. Is using <body onload="funct()"> the only solution?
3 ответов
+ 4
Might come in handy
https://www.sololearn.com/post/7444/?ref=app
+ 3
no, you can put your script at the bottom of the body tag using the script tag <script>here</script> saves all the confusion with having to put eveything inside the window.onload = function
+ 2
in your JavaScript you can also use:
window.onload = funct;