如何让Window.Open()打开一个最大化窗口?

SpaceTime 2003-12-05 04:42:16
如何用最简单的方法实现让Window.Open()打开一个最大化窗口?
...全文
307 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
SpaceTime 2003-12-24
  • 打赏
  • 举报
回复
up!!!!
soloxiao 2003-12-06
  • 打赏
  • 举报
回复
绝对可用:
--------------------------------
<OBJECT id='max' type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'>
<param name='Command' value='Maximize'>
</object>
<script>
function aa(){
if(document.all&&screen.width>document.body.offsetWidth+5)
//if(window.width < w || window.height < h){
max.Click();
//}
}

</script>

<body onload="javascript:aa()">
<a href="aaa.htm" target="_blank">open</a>
nik_Amis 2003-12-06
  • 打赏
  • 举报
回复
up
hrong 2003-12-05
  • 打赏
  • 举报
回复
window.open("http://www.csdn.net/","","channelMode");
monkeys 2003-12-05
  • 打赏
  • 举报
回复
全屏
fullscreen=1
最大化
width=screen.availWidth,height=screen.availHeight
gjd111686 2003-12-05
  • 打赏
  • 举报
回复
window.open('url','','fullscreen');
请参考:
open

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

Description

Opens a new window and loads the document given by URL, or a blank document if a URL is not provided.

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



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.

Return Value

Returns a reference to the new window. Use this reference to script properties and methods on the new window.

Remarks

A name for the new window can be used as a target for a form or an A element. By default, the open() method creates a window that has a default width and height and the standard menu, toolbar, and other features of Internet Explorer. You can alter this set of features by using the features parameter. This parameter is a string consisting of one or more feature settings. The replace parameter controls whether the new window is put into the browser history list.

For example, the following creates a new window that contains Sample.htm. The new window is 200 by 400 pixels, has a status bar, but does not have a toolbar, menu bar, or address field.

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

Applies To

window

SpringWang 2003-12-05
  • 打赏
  • 举报
回复
全屏
fullscreen=1
最大化
width=screen.availWidth,height=screen.availHeight
yuhangyan 2003-12-05
  • 打赏
  • 举报
回复
window.open("你的.jsp","DisplayWindow","toolbar=no,menubar=no,scrollbars,directories=no,resizable=no,top="+(screen.height-600)/2+",left=" +(screen.width-800)/2 + ",fullscreen=3,width=792,height=550 ");
看看这样是否可以

87,921

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧