Answers for "js run code when document is loaded"

2

js on page loaded

window.onload = function() {
  yourFunction(param1, param2);
};
Posted by: Guest on April-02-2021
0

if document is loaded

if (document.readyState === 'complete') {
  // The page is fully loaded
}
Posted by: Guest on March-05-2021

Code answers related to "js run code when document is loaded"

Code answers related to "Javascript"

Browse Popular Code Answers by Language