title: Document.onload not working in JavaScript?
body: <p>I write <code>document.onload</code> code inside my head tag.. but it doesn't seems to work.
  here is my code.. </p>
  
  <pre><code>&lt;head&gt;
  &lt;script&gt;
      document.onload = function () {
          alert("Window Loaded...!!");
      }
  &lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>But if i replace  with <code>window.onload</code> it perfectly works!!
  What is the problem? Am I doing something wrong ??</p>