title: What is the difference between addEventListener and attachEvent?
body: <p>This is the code i used in my page,</p>
  
  <pre><code>if (window.addEventListener) {
     window.addEventListener("load", createIframe, false);            
  }
  else if (window.attachEvent) {
     window.attachEvent("onload", createIframe);            
  }
  else {
     window.onload = createIframe;           
  }
  </code></pre>
  
  <p>Please explain me that where my <strong>createIframe</strong> funtion get called? and what is the difference between <em>addEventListener</em> and <em>attachEvent</em>? and what is the different between <em>load</em> and <em>onload</em>? totally confused to find difference between <strong>addEventLisener with load and attachEvent with onload</strong> </p>