怎样用javascript实现网页真正的全屏, 包括工具栏,状态栏,地址栏都要隐藏了,只有当点击自己设定的提交按钮后,才可以离开全屏网页.怎样实现.多谢了...

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script language="javascript" src="smAjax.js"></script>
    <script language="javascript">
    function Init()
    {        window.moveTo(0,0);
            window.resizeTo(window.screen.width,window.screen.height);
    }
    </script>
    </head>
    <body onload="Init()">
    </body>
    </html>
      

  2.   

    我在一个文件里:   
      <script   language="JavaScript"   type="text/JavaScript">   
          window.open('index.html','star','fullscreen');   
      </script>   
        
        
      第二个文件index.html里:   
      <html>   
      <head>   
      <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">   
      <title></title>   
      <style   type="text/css">   
      <!--   
      body   {   
      text-align:   center;   
      overflow-x:hidden;   
      overflow-y:hidden;   
      margin-top:   0px;   
      margin-right:   0px;   
      margin-bottom:   0px;   
      margin-left:   0px;   
      background-color:   #000000;   
      }   
      table   {   
      background-color:   #FFFFFF;   
      height:   600px;   
      width:   800px;   
      }   
      .td1   {   
      width:138px;   
      background-image:   url(img/l1.gif);   
      background-repeat:   no-repeat;   
      }   
      .td2   {   
      height:   49px;   
      }   
      -->   
      </style>   
      <script   language="JavaScript"   type="text/JavaScript">   
      <!--   
      function   starwu(i)   {   //v1.0   
      var   sh=window.screen.height,sw=window.screen.width;   
      if   (sh<600||sw<800)   alert('请使用800×600以上分辨率!');   
      if   (sh>600)   {   
      var   top=(sh-600)/2;   
      eval('i.style.cssText="margin-top:   '+top+'px"');   
      }   
      }   
      //-->   
      </script>   
      </head>   
      <body   id="body1"   onLoad="starwu(body1)">   
      <table     border="0"   cellspacing="0"   cellpadding="0">   
          <tr>     
              <td   rowspan="2"   class="td1">&nbsp;</td>   
              <td   class="td2"><div   align="center"><img   src="img/l2.gif"   width="616"   height="49"></div></td>   
          </tr>   
          <tr>   
              <td><div><iframe   src="zm/1.htm"   name="star"   width="662"   height="551"   marginwidth="0"   mrginheight="0"   frameborder="0"></iframe></div></td>   
          </tr>   
      </table>   
      </body>   
      </html>   这回应该是你想要的