有一个button点一下,现在的窗口就全屏,怎么实现?

解决方案 »

  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>
      <title> new document </title>
      <script type="text/javascript">
      <!--
    function showAll(){
    window.moveTo(0, 0);
    window.resizeTo(screen.availWidth, screen.availHeight);
    }
      //-->
      </script>
     </head> <body>
      <input type="button" value=" 全屏 " onclick="showAll()" />
     </body>
    </html>
      

  2.   


            function max() {
                var a=new ActiveXObject("WScript.Shell");
                a.sendKeys("{F11}");
                
                
            }<input type="button" onclick="max()" value="max"></input>
      

  3.   

    window.open('aa.aspx','fullscreen=1');
      

  4.   

    natineprince  的不错。 又学了招 o(∩_∩)o...哈哈