title: document.body.clientHeight not working? (JavaScript)
body: <p>document.body.clientHeight not returning correct values (in below code return 0 onload and 20 onresize )</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Untitled&lt;/title&gt;
  &lt;script type="text/javascript" &gt;
  function height1()
  {
      document.getElementById("viewheight").innerHTML = document.body.clientHeight;
  }
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body onload="height1();" onresize="height1();"&gt;
  &lt;span id="viewheight"&gt;&lt;/span&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any Comments..... plz help!</p>