0 votes
in JavaScript by
What are the ways to execute javascript after page load?

1 Answer

0 votes
by

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

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