Skip to main content
InterviewHubPRO
Section Overview
Q180

Question 180 of 536

Part 4: Prototypes, Object Methods & Event Loop (174 - 253)

34%
JavaScript & V8 Internals (536 Qs)•Part 4: Prototypes, Object Methods & Event Loop (174 - 253)

What are the ways to execute javascript after a page load

junior LevelMost AskedCode ExampleEvent LoopPrototypes

You can execute javascript after page load in many different ways,

  1. window.onload:
javascript
  window.onload = function ...
  1. document.onload:
javascript
  document.onload = function ...
  1. body onload:
javascript
  <body onload="script();">