请问如何将弹出页面自动最大化?

各位好:我在使用一按钮弹出一个新页面时,控制它没有工具栏、地址栏,有滚动条,这些都很好实现,但是我记不得是用什么函数来控制它[自动最大化]了,请各位帮忙写个代码给我,谢谢!

马上加分!!!
---------------------------------------------------------------

window = object.open([URL [, name [, features [, replace]]]])

window.open("sample.htm",null,
"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no,fullscreen=yes");

Parameter Description
URL String specifying the URL of the document to display. If no URL is specified, a new window with about:blank will be displayed.
name Optional. String specifying the name of the window. This name is used for TARGET on a FORM or an A.
features Optional. String specifying the window ornaments to display. The following table lists the supported features. Syntax Description
fullscreen={ yes ¦ no ¦ 1 ¦ 0 } Specifies whether to display the browser in a full-screen or normal window. Default is no.
Use full-screen mode carefully. Because this mode hides the browser's title bar and menus, you should always provide a button or other visual clue to help the user close the window. ALT+F4 will also close the new window.

channelmode={ yes ¦ no ¦ 1 ¦ 0 } Specifies whether to display the window in theater mode and show the channel band.
toolbar={ yes ¦ no ¦ 1 ¦ 0 } Specifies whether to display the browser toolbar, making buttons such as Back, Forward, and Stop available.
location= { yes ¦ no ¦ 1 ¦ 0 } Specifies whether to display the input field for entering URLs directly into the browser.
directories = { yes ¦ no ¦ 1 ¦ 0 } Specifies whether to add directory buttons. Default is no.
status={ yes ¦ no ¦ 1 ¦ 0 } Specifies whether to add a status bar at the bottom of the window. Default is yes.
menubar={ yes ¦ no ¦ 1 ¦ 0} Specifies whether to display the menu bar. Default is yes.
scrollbars={ yes ¦ no ¦ 1 ¦ 0} Specifies whether to display horizontal and vertical scroll bars. Default is yes.
resizable={ yes ¦ no ¦ 1 ¦ 0} Specifies whether to display resize handles at the corners of the window.
width=number Sets the width of the window, in pixels. Minimum value should be 100.
height=number Specifies the height of the window, in pixels. Minimum value should be 100.
top=number Specifies the top position, in pixels. This value is relative to the upper-left corner of the screen.
left=number Specifies the left position, in pixels. This value is relative to the upper-left corner of the screen.

replace Optional. A boolean value specifying whether the URL that is loaded into the new page should create a new entry in the window's browsing history or replace the current entry in the browsing history. If true, no new history entry is created

---------------------------------------------------------------

16. 最小化、最大化、关闭窗口

1<object classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11" id="hh1">
2<param name="Command" value="Minimize"/></object>
1<object classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11" id="hh2">
2<param name="Command" value="Maximize"/></object>
1<object classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" id="hh3">
2<param name="Command" value="Close"/></object>
1<input onclick="hh1.Click()" type="button" value="最小化"/>
1<input onclick="hh2.Click()" type="button" value="最大化"/>
1<input onclick="hh3.Click()" type="button" value="关闭"/>

本例适用于IE

---------------------------------------------------------------

 1<script language="javascript">   
 2function maxWin()   
 3{   
 4try   
 5{   
 6var b = top.screenLeft == 0;   
 7var b = b && top.screen.availHeight - top.screenTop - top.body.offsetHeight - 20 == 0;   
 8if(!b)   
 9{   
10var str = '<object id=Max classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'   
11str += '<param name="Command" value="Maximize"></object>';   
12document.body.insertAdjacentHTML("beforeEnd", str);   
13document.getElementById("Max").Click();   
14}   
15}catch(e){}   
16}   
17</script>
1<body onload="maxWin()" onresize="maxWin()"></body>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus