window.open(""a.htm","","fullscreen=yes")

解决方案 »

  1.   

    to meizz:
    可是我并不想最大化此窗体!
      

  2.   

    ie5.5
    <script language="JScript">
    var oPopup = window.createPopup();
    var oPopupBody = oPopup.document.body;
    oPopupBody.style.border = "0px none"
    oPopupBody.bgColor='#c0c0c0'
    oPopupBody.innerHTML = "<img src=../banners/help.gif>"
    oPopup.show(600,50,32,32)
    </script>
      

  3.   


    function verifyCompatibleBrowser(){ 
        this.ver=navigator.appVersion 
        this.dom=document.getElementById?1:0 
        this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
        this.ie4=(document.all && !this.dom)?1:0; 
        this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
     
        this.ns4=(document.layers && !this.dom)?1:0; 
        this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
        return this 

    bw=new verifyCompatibleBrowser() 
      
    var speed=50 
     
    var loop, timer 
     
    function ConstructObject(obj,nest){ 
        nest=(!nest) ? '':'document.'+nest+'.' 
        this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
        this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
        this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
        this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
        this.up=MoveAreaUp;this.down=MoveAreaDown; 
        this.MoveArea=MoveArea; this.x; this.y; 
        this.obj = obj + "Object" 
        eval(this.obj + "=this") 
        return this 

    function MoveArea(x,y){ 
        this.x=x;this.y=y 
        this.css.left=this.x 
        this.css.top=this.y 

     
    function MoveAreaDown(move){ 
    if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
        this.MoveArea(0,this.y-move) 
        if(loop) setTimeout(this.obj+".down("+move+")",speed) 


    function MoveAreaUp(move){ 
    if(this.y<0){ 
        this.MoveArea(0,this.y-move) 
        if(loop) setTimeout(this.obj+".up("+move+")",speed) 


     
    function PerformScroll(speed){ 
    if(initialised){ 
    loop=true; 
    if(speed>0) objScroller.down(speed) 
    else objScroller.up(speed) 


     
    function CeaseScroll(){ 
        loop=false 
        if(timer) clearTimeout(timer) 

    var initialised; 
    function InitialiseScrollableArea(){ 
        objContainer=new ConstructObject('divContainer') 
        objScroller=new ConstructObject('divContent','divContainer') 
        objScroller.MoveArea(0,0) 
        objContainer.css.visibility='visible' 
        initialised=true; 

    // end absolutely positioned scrollable area object scripts
    function noBorderWin2()  
    {
      var contents="<html>"+
    "<head>"+
    "<title>dictionary</title>"+
    "<link rel=\"stylesheet\" href=\"body.css\" type=\"text/css\">"+
    "</head>"+
    "<body topmargin=0 leftmargin=0 scroll=no onselectstart='return false' ondragstart='return false'>"+
    "<object id=setmin type=\"application/x-oleobject\" classid=\"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11\">"+
    "<param name=\"Command\" value=\"minimize\">"+
    "</object>"+
    "<object id=setclose type=\"application/x-oleobject\" classid=\"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11\">"+
    "<param name=\"Command\" value=\"close\">"+
    "</object>"+
    "<table width=\"457\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"+
      "<tr style=cursor:default; onmousedown=\"x=event.x;y=event.y;setCapture();\" onmouseup=\"releaseCapture();\" onmousemove=\"if(event.button==1)self.moveTo(screenLeft+event.x-x,screenTop+event.y-y);\">"+
        "<td align=\"left\" valign=\"bottom\">"+
         "<img src=\"images/boofang_00.gif\" width=\"457\" height=\"32\" usemap=\"#Map\" border=\"0\">"+
    "</td>"+
      "</tr>"+
      "<tr>"+
        "<td>"+ 
    "<iframe name=dic  frameborder=\"0\" scrolling=\"no\" src=\"boofang.html\" width=457 height=340>"+
    "</iframe>"+
        "</td>"+
      "</tr>"+
    "</table>"+
    "<map name=\"Map\">"+
      "<area shape=\"circle\" coords=\"414,15,8\" onclick=\"setmin.Click()\">"+
     "<area shape=\"circle\" coords=\"437,15,8\" onclick=\"setclose.Click()\">"+
    "</map>"+
    "</body>"+
    "</html>";  var w=455;
      var h =348;
      pop=window.open("","_blank","fullscreen=yes");
      pop.resizeTo(w,h);
      pop.moveTo((screen.width-w)/2,(screen.height-h)/2);
      pop.document.writeln(contents); /* if(pop.document.body.clientWidth!=w||pop.document.body.clientHeight!=h)  
      {
        temp=window.open("","nbw_v6");
    temp.close();
    window.showModalDialog("about:<"+"script language=javascript>window.open('','nbw_v6','fullscreen=yes');window.close();"+"</"+"script>","","dialogWidth:0px;dialogHeight:0px");
    pop2=window.open("","nbw_v6");
        pop2.resizeTo(w,h);
        pop2.moveTo((screen.width-w)/2,(screen.height-h)/2);
        pop2.document.writeln(contents);
    pop.close();
      }
      */
    }
    你看着改吧
      

  4.   

    最好这样:
    <script>
    window.open("","","fullscreen=yes").resizeTo(300,300)
    </script>
      

  5.   

    不过IE6以后就不支持resizeTo()方法了!
    所以,IE6要是用这个,直接打开一个全屏的网页,很烦!
      

  6.   

    to fason:
    我的显示内容不是静态页面,是Servlet返回的页面!应该这么作?
      

  7.   

    window.createPopup()是ie5.5以上的新用法,可以考虑呀
      

  8.   

    <iframe src=2.html name=f5 style=display:none onload=f()></iframe>
    <script>
    function f(){
    var oPopup = window.createPopup();
    var oPopupBody = oPopup.document.body;
    oPopupBody.style.border = "0px none"
    oPopupBody.innerHTML = f5.document.body.innerHTML
    oPopup.show(10,10,screen.width-20,screen.height-20)
    }
    </script>
      

  9.   

    to fason:
    我的显示内容不是静态页面,是Servlet返回的页面!应该这么作?谢谢!