title: To call Dofullscreen function immediately after page load
body: <p>Following is the script</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
              function DoFullScreen() {
  
                  var isInFullScreen = (document.fullScreenElement &amp;&amp; document.fullScreenElement !== null) ||    // alternative standard method  
                  (document.mozFullScreen || document.webkitIsFullScreen);
  
                  var docElm = document.documentElement;
                  if (!isInFullScreen) {
  
                      if (docElm.requestFullscreen) {
                          docElm.requestFullscreen();
                      }
                      else if (docElm.mozRequestFullScreen) {
                          docElm.mozRequestFullScreen();
                          //alert("Mozilla entering fullscreen!");
                      }
                      else if (docElm.webkitRequestFullScreen) {
                          docElm.webkitRequestFullScreen();
                          alert("Webkit entering fullscreen!");
                      }
                  }
              }
  
          &lt;/script&gt;
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;body onload="DoFullScreen()"&gt;
      &lt;form id="form1" runat="server" &gt;
          &lt;div id="div1"&gt;
              &lt;input id="bt1" type="button" value="button"   /&gt;
              Hello
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I have tried   </p>
  
  <ol>
  <li><code>$(window).load</code></li>
  <li><code>$(document).ready(function(){    $("#bt1").load</code></li>
  </ol>