...see more

To add multiple window.onload events you can use

if (window.addEventListener) // W3C standard
{
  window.addEventListener('load', myFunction, false); // not 'onload'
} 
else if (window.attachEvent) // Microsoft
{
  window.attachEvent('onload', myFunction);
}

Comments