window.onload
snippet in javascript

window.onload

user4130

window.onload = function() {
  // Some code
};

on load javascript

user8821

window.onload = (event) => {
  console.log('page is fully loaded');
};

on load javascript

user5869

window.addEventListener('load', (event) => {
  console.log('page is fully loaded');
});

document load javascript

user3021

window.onload = function() {
  // Code here
}

js document onload

user1525

//use
window.onload=()=>{};

window.onload

user1488

window.onload = function() {
  init();
  doSomethingElse();
};