修改本身窗口是不可能,不过可以间接的无提示关闭自己,再打开一个全屏的窗口,然后resizeTo等等

解决方案 »

  1.   

    I am sorry.
    Windows can't control property of self.
      

  2.   

    It's easy!Try this
    ---------------------------
    <input type="submit" name="Submit" value="OK-1" onclick=window.open("http://www.csdn.net","newwin","fullscreen=yes")>
      

  3.   

    哈哈,把这段代码放到页面中试试
    <script>
    //tmtC_winMaximizer 
    if (document.layers){
    var larg=screen.availWidth-10;
    var altez=screen.availHeight-20;}
    else{
    var larg=screen.availWidth-2+60;
    var altez=screen.availHeight+300;}
    self.resizeTo(larg,altez);
    self.moveTo(-30,-200);
    //tmtC_winMaximizerEnd
    </script> 
    //不好意思,没有调整的完全对
      

  4.   

    <script>
    newWin=window.open("",null,"fullscreen=yes");
    newWin.document.write("<body style='overflow:hidden'> Press Alt-F4 to close this window.</body>");
    </script>怎么样?什么都没了。
      

  5.   

    The perfect one:--------------------------<script>
    var a = window.open("about:blank","","fullscreen=yes")
    self.opener=null
    self.close()
    a.moveTo(0,0)
    a.resizeTo(screen.Width,screen.Height)
    a.focus();
    a.location='http://www.proxy365.com/'
    </script>
      

  6.   

    拜托,两位。
    我需要的是自己设置自己的属性
    window.open()打开的是另一个窗口。
    而且也很容易实现。
    -_-
      

  7.   

    甚矣,汝之...你看看我最后那个perfect one!!! 并不仅仅是打开一个新窗口。而是用它全屏打开一个链接。这样只要你将需要全屏打开的页面的链接放到里面,就可以实现你的效果了。你没有执行上述代码看看吗?我想就是你想要的效果。只是不一定非得要在你要显示的文件中实现吧
      

  8.   

    最终解决方案:
    1.在onload事件中判断将要打开的窗口是否全屏:
    2.函数tofull()实现该页面的全屏显示
    3.该代码在IE等单视窗中有效;如果在腾讯的TE或MyIE中,将会陷入死循环:(---------------------
    <script>
    function tofull(){
    var file =self.location;
    var a = window.open("about:blank","","fullscreen=yes");
    self.opener=null;
    self.close();
    a.location=file;
    a.full.isfull=1;
    }function window.onload(){
    if( document.body.clientHeight != screen.height  || (document.body.clientWidth+16) !=screen.width )tofull();
    }
    </script>
    这是一个演示程序,点击下面的“全屏显示”按钮,将使本页实现全屏显示。
    <p align=center><input type="button" value="全屏显示" onclick=tofull()></p>
      

  9.   

    : weidegong
    谢谢你了
    但效果有点差别
    顺便问一下
    onLoad()函数一个页面只执行一次吧
    他和preload()有什么差别
      

  10.   

    用window.resizeTo()把窗口变到全屏大,而且用window.moveTo()把窗口的边框也移出屏幕能看到的地方,这样差不多,我想。
      

  11.   

    使用方法 只需将下面代码放入页面中即可实现全屏打开。<script language="javascript">
    function window.onload(){
      var Request = new Array();//保存参数
      var s = location.search.substring(1);
      if (s && s!=""){
       var list = s.split("&");
    for (var i=0; i < list.length; i++){
    var pair = list[i].split("=");
    if (pair[0] && pair[0] !=""){
    Request[unescape(pair[0])] = unescape(pair[1]);
    }
    }
      }  var fullscreen=Request["fullscreen"];
      if(fullscreen!="yes"){
       var file =self.location;
       var a = window.open("about:blank","","fullscreen=yes")
       self.opener=null
       self.close()
       a.location=file + "?fullscreen=yes";
      }
    }
    </script>
      

  12.   

    现在好了,但是出现一个新的问题,即:打开全屏的时候,设open()参数3,"fullscreen=yes,scrollbars=no",fullscreen表现尚好,但是在有的机器上,scrollbars不管用,写了参数,右边依然故我的显示出宽18象素,高480象素的边缘滚动框,尽管页面很小,不够一个整面。
    我想知道这个属性是否和windows系统的设定有关,应怎么改?
    望大家解惑!!!谢谢 weidegong 的支持。
    : Reve:你的方法我也试过,效果不好。。
      

  13.   

    <script>
    var a = window.open("about:blank","","fullscreen=yes")
    self.opener=null
    self.close()
    a.moveTo(0,0)
    a.resizeTo(screen.Width,screen.Height)
    a.focus();
    a.location='http://lucky.myrice.com'
    a.document.body.style.overflow = "hidden"
    </script>
      

  14.   

    thabk you!   net_lover
    you will be payed for.