window.open('index.jsp','','fullscreen=yes')

解决方案 »

  1.   

    window.open('index.jsp','','fullscreen=yes');
    什么都没有,除了document
      

  2.   

    <Script language="javascript">
    var w=screen.availWidth-10;
    var h=screen.availHeight-30;
    var objwin = window.open('index.asp',"win","fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=" + w + ",height=" + h + ",top=0,left=0",true);
    window.opener=null;
    self.close();
    objwin.focus();
    </script>
      

  3.   

    window.open('','','fullscreen=yes');
      

  4.   

    如果要始终打开一个新窗口,那么第二个参数为空即可,比如window.open('url','','参数');
    如果第二个参数写上了名称,那么会先判断是否有窗口打开了,如果打开了,则让那个窗口获得焦点,
    没有打开则打开新窗口。
    wen1818(冷月孤心)的代码中window的参数已经给全了,只要改动一下就能获得地址栏,如下:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="JavaScript">
    function addVar()
    {
    var w=screen.availWidth-10;
    var h=screen.availHeight-30;
    var objwin = window.open('http://www.csdn.net',"win","fullscreen=0,toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=" + w + ",height=" + h + ",top=0,left=0",true);
    }
    </script>
    </head>
    <body>
    <input type="button" onClick="addVar();" value="click">
    </body>
    </html>
    fullscreen的优先级很高,如果设定为"yes"或"1"的话,其他属性都失效,将出现一个全屏的没有任何工具条的窗口。