Posted By

pussard on 05/04/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

shalomfriss


Onload Event Listener


 / Published in: JavaScript
 

  1. if (typeof window.addEventListener != 'undefined')
  2. window.addEventListener('load', init, false);
  3. else if (typeof document.addEventListener != 'undefined')
  4. document.addEventListener('load', init, false);
  5. else if (typeof window.attachEvent != 'undefined')
  6. window.attachEvent('onload', init);

Report this snippet  

You need to login to post a comment.