title: How to run JavaScript code before page load?
body: <p>I have working in <strong>asp.net</strong> web application. Here I need to run <strong>JavaScript</strong> before page load.</p>
  
  <p>I have tried:</p>
  
  <pre><code>&lt;body oninit="funinit();" onprerender="funRender();" onload="funload();"&gt;
  
  
  &lt;/body&gt;
  
   &lt;script type="text/javascript" language="javascript"&gt;
      function funinit() {
          alert("funinit");
      }
      function funload() {
          alert("funload");
      }
      function funRender() {
          alert("funRender");
      }      
  
  &lt;/script&gt;
  </code></pre>
  
  <p>here only funload() is working.</p>