resizeTo Method--------------------------------------------------------------------------------Sets the size of the window to the specified width and length values. Syntaxwindow.resizeTo(iWidth, iHeight)ParametersiWidth  Required. Integer that specifies the width of the window, in pixels. 
iHeight Required. Integer that specifies the height of the window, in pixels. Return ValueNo return value. 

解决方案 »

  1.   

    aa=window.open()
    aa.window.resizeTo(iWidth, iHeight)
      

  2.   

    resizeTo在 IE6下不能用吧?
    我试过的
      

  3.   

    呵呵,前几天刚好在聊这个问题。[15:18:22] pop3,smtp,m..: 我发现height最小不能小于40?
    [15:18:38] pop3,smtp,m..: height=10根本没作用?
    [15:19:28] emu: 嗯,确实如此
    [15:19:53] pop3,smtp,m..: 啊。我的一个页面不到40高。郁闷!
    [15:20:14] emu: 如果不考虑2800版的话用fullscreen
    [15:21:14] pop3,smtp,m..: fullscreen.  NO....我讨厌那个东西。
    [15:21:34] emu: 我更讨厌
    [15:21:51] pop3,smtp,m..: 孟子告诉我了。他说height不能小于 100。
    [15:25:51] emu: var
               win=window.open('','Upload','width=300,height=10,top=0,left
               =0');
               alert(win.document.body.offsetHeight);
               win.resizeTo(300,10)
               alert(win.document.body.offsetHeight);
    [15:26:03] emu: 我最小能弄到75呵呵
    [15:29:34] pop3,smtp,m..: 啊。孟子搞错了。呵呵。75也不爽。我试试
    [15:33:02] emu: 我大概知道原因了
    [15:33:04] emu: <SCRIPT LANGUAGE="JavaScript">
               <!--
               var win=window.open('','one','');
               win.resizeTo(300,10)
               
               var win=window.open('','two','menubar=0');
               win.resizeTo(300,10)
               
               //-->
               </SCRIPT>
    [15:33:18] pop3,smtp,m..: ??
    [15:33:44] emu: 小于75之后,其实我们显示的区域是原来menubar的位置
    [15:34:07] emu: 系统禁止你把这个位置占用了造成menubar显示紊乱
    [15:34:15] pop3,smtp,m..: 可是menubar也没有75呀
    [15:34:22] emu: 我这里有
    [15:34:44] pop3,smtp,m..: menubar是菜单条?
    [15:34:59] emu: 是
               系统笨在不管是否显示menubar都要占这个空间。
    [15:35:26] emu: var win=window.open('','one','');
               win.resizeTo(300,10)
               
               var win=window.open('','two','menubar=0');
               win.resizeTo(300,10)
    [15:35:34] emu: 这两个窗口是一样大的
    [15:36:04] emu: 只不过一个有显示区域而没有菜单条,另一个相反
    [15:36:30] pop3,smtp,m..: 啊,不错!!一目了然
    [15:37:01] emu: 是微软笨嘛:D
    [15:38:12] pop3,smtp,m..: 可是,如果里面有内容的话。内容是可以占用menubar的空间吧。
    [15:38:39] emu: 如果不显示menubar的话就是
    [15:46:21] pop3,smtp,m..: var win=window.open('','two','menubar=0');
               win.resizeTo(300,10)
               
               var
               win=window.open('','tree','width=300,height=10,menubar=0');
    [15:47:32] emu: open方法没有resizeTo方法聪明嘛
    [15:50:03] pop3,smtp,m..: 用resizeTo最小到70,直接用open最小100.