Answers for "javascript first loading page"

2

wait for page load js

window.addEventListener('load', function () {
  
})

//THE OTHER ANSWER IS WRONG (has a syntax error)
Posted by: Guest on November-07-2020
2

window.onload execute after load page

/* javascript function is executed after 5 seconds page was loaded */
window.onload = function() {
   setTimeout(loadAfterTime, 5000)
}; 
 
function loadAfterTime(){
   document.getElementById("menu").style.display="block";
}
Posted by: Guest on October-30-2020

Code answers related to "javascript first loading page"

Code answers related to "Javascript"

Browse Popular Code Answers by Language