Answers for "document.ready function on page load"

1

js on page ready

document.addEventListener("DOMContentLoaded", function(event){
  // your code here
});

Better than 

window.onload = function(){
    // code goes here
};
Posted by: Guest on April-02-2021
0

$(document).ready, window.onload

document.addEventListener("DOMContentLoaded", function(event) { 
  //do work
});

// or
window.onload = function() {

};
Posted by: Guest on September-01-2021

Code answers related to "document.ready function on page load"

Code answers related to "Javascript"

Browse Popular Code Answers by Language