JavaScript Tutorial For Beginners #41 - Window onLoad Event

preview_player
Показать описание

Many times it's useful to only start our JavaScript functions AFTER the window has fully loaded, so we can use this event to make sure that happens.

Any questions, fire away :).

========== JavaScript for Beginners Playlist ==========

========== CSS for Beginners Playlist ==========

========== HTML for Beginners Playlist ==========

========== The Net Ninja ============

========== Social Links ==========

Рекомендации по теме
Комментарии
Автор

I just spent hours researching this topic on stackoverflow, MDN, W3, Medium, etc. And all of the explanations were filled so much vague and unnecessary jargon that I couldn't understand anything. And here, it's all explained very neatly and concisely in a bit over 5 minutes. Bravo!

romanmontoya
Автор

Have done all 40 of these in the last couple days and learned more than a month of other "techie" "beginner(NOT)" tutorials. It blows my mind out anyone could down votes these.

vincecaruso
Автор

Your instructions are so clear. Thank you for all of these awesome lessons!

edhead
Автор

As always, NetNinja has the one tutorial that you need. Thanks, master Ninja!

envivomedia
Автор

I was pulling my hair out troubleshooting class ReferenceError race conditions before stumbling on your vid. thanks so much!!

kutlass
Автор

thanks bro
i've been disturb with my js loading before my html, i really don't know how to thank you
you're the best

michaelmartins
Автор

Absolute legend mate. Thanks brother :)

bobbydelavega
Автор

i think when using defer attribute in <script src = xxx *defer* ></script> file should work without creating onload event

NixTheGat
Автор

A little suggestion, can I?
It would be awesone if you give us your files to download, like the files on this vídeo, so we can download and use it to tests, like I don't know CSS and HTML yet, and looking to the codes on the files I would comprehend it better

NostalgiaPlaysPS
Автор

That's an amazing video, I have one question for you.

How did you manage to apply transitions for dynamic content . Apparently jquery is the best option. Is there any other way to do this?

prashanthsasidharan
Автор

But what is the difference between using window.onload directly and using of function setUpEvents?

zoirradjabov
Автор

my function consisting of actually 2 function doesnt work when i try it like this :(

hylkenicola
Автор

best tutorials thanks shuan you awesome

josephmakram
Автор

Can you please explain me why 'document.getElementById()' works only inside function 'setUpEvents' and not inside 'button.onclick fucntion()' ??

sweetatamang
Автор

Just to be clear when we use the onload event, hope it doesn't stop other codes outside of it f on running?...just wanna be clear???

joshel
Автор

A doubt please clarify.you cam save your data in input after loading using this event right??

marimuthunagappan
Автор

If i understand the window.onload object, its that when it is set to a function, that function will execute when the page loads?

dgross
Автор

What if you want to use it inside tampermonkey as a user script and you have no access to the html. I want to close a popup on a website when it loads, which only has <button class> no id. Can you teach that?

hillaryeatsbabies
Автор

when you publish this video, I did not have at least an internet access. poor village.

dilanmjayawardena
Автор

Really helpful. Can you please tell how does it differ from "onpageshow" event?

AbhijeetDolai