oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
sURL Optional. String that specifies the URL of the document to display. If no URL is specified, a new window with about:blank is displayed. sName Optional. String that specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an a element._blank The url is loaded into a new, unnamed window.
_parent The sURL is loaded into the current frame's parent. If the frame has no parent, this value acts as the value _self.
_search Available in Microsoft® Internet Explorer 5 and later. The sURL is opened in the browser's search pane.
_self The current document is replaced with the specified sURL
_top sURL replaces any framesets that may be loaded. If there are no framesets defined, this value acts as the value _self.
sFeatures Optional. This String parameter is a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following features are supported.channelmode = { yes | no | 1 | 0 } Specifies whether to display the window in theater mode and show the channel band. The default is no.
directories = { yes | no | 1 | 0 } Specifies whether to add directory buttons. The default is yes.
fullscreen = { yes | no | 1 | 0 } Specifies whether to display the browser in full-screen mode. The 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 closes the new window.
height = number Specifies the height of the window, in pixels. The minimum value is 100.
left = number Specifies the left position, in pixels. This value is relative to the upper-left corner of the screen.
location = { yes | no | 1 | 0 } Specifies whether to display the input field for entering URLs directly into the browser. The default is yes.
menubar = { yes | no | 1 | 0 } Specifies whether to display the menu bar. The default is yes.
resizable = { yes | no | 1 | 0 } Specifies whether to display resize handles at the corners of the window. The default is yes.
scrollbars = { yes | no | 1 | 0 } Specifies whether to display horizontal and vertical scroll bars. The default is yes.
status = { yes | no | 1 | 0 } Specifies whether to add a status bar at the bottom of the window. The default is yes.
titlebar = { yes | no | 1 | 0 } Specifies whether to display a title bar for the window. This parameter is ignored unless the calling application is an HTML Application or a trusted dialog box. The default is yes.
toolbar = { yes | no | 1 | 0 } Specifies whether to display the browser toolbar, making buttons such as Back, Forward, and Stop available. The default is yes.
top = number Specifies the top position, in pixels. This value is relative to the upper-left corner of the screen.
width = number Sets the width of the window, in pixels. The minimum value is 100. bReplace Optional.When the sURL is loaded into the same window, this Boolean parameter specifies whether the sURL creates a new entry or replaces the current entry in the window's history list. true sURL replaces the current document in the history list
false sURL creates a new entry in the history list.
sURL Optional. String that specifies the URL of the document to display. If no URL is specified, a new window with about:blank is displayed. sName Optional. String that specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an a element._blank The url is loaded into a new, unnamed window.
_parent The sURL is loaded into the current frame's parent. If the frame has no parent, this value acts as the value _self.
_search Available in Microsoft® Internet Explorer 5 and later. The sURL is opened in the browser's search pane.
_self The current document is replaced with the specified sURL
_top sURL replaces any framesets that may be loaded. If there are no framesets defined, this value acts as the value _self.
sFeatures Optional. This String parameter is a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following features are supported.channelmode = { yes | no | 1 | 0 } Specifies whether to display the window in theater mode and show the channel band. The default is no.
directories = { yes | no | 1 | 0 } Specifies whether to add directory buttons. The default is yes.
fullscreen = { yes | no | 1 | 0 } Specifies whether to display the browser in full-screen mode. The 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 closes the new window.
height = number Specifies the height of the window, in pixels. The minimum value is 100.
left = number Specifies the left position, in pixels. This value is relative to the upper-left corner of the screen.
location = { yes | no | 1 | 0 } Specifies whether to display the input field for entering URLs directly into the browser. The default is yes.
menubar = { yes | no | 1 | 0 } Specifies whether to display the menu bar. The default is yes.
resizable = { yes | no | 1 | 0 } Specifies whether to display resize handles at the corners of the window. The default is yes.
scrollbars = { yes | no | 1 | 0 } Specifies whether to display horizontal and vertical scroll bars. The default is yes.
status = { yes | no | 1 | 0 } Specifies whether to add a status bar at the bottom of the window. The default is yes.
titlebar = { yes | no | 1 | 0 } Specifies whether to display a title bar for the window. This parameter is ignored unless the calling application is an HTML Application or a trusted dialog box. The default is yes.
toolbar = { yes | no | 1 | 0 } Specifies whether to display the browser toolbar, making buttons such as Back, Forward, and Stop available. The default is yes.
top = number Specifies the top position, in pixels. This value is relative to the upper-left corner of the screen.
width = number Sets the width of the window, in pixels. The minimum value is 100. bReplace Optional.When the sURL is loaded into the same window, this Boolean parameter specifies whether the sURL creates a new entry or replaces the current entry in the window's history list. true sURL replaces the current document in the history list
false sURL creates a new entry in the history list.
解决方案 »
- 求救!!api百度地图,自定义公车面板的用法
- jquery-easyui中的Validate如何验证Select表单的值?
- tomcat6.0报错
- 如何用Ext展现信,同志一类的文档
- web开发问题
- 关于Onkeypress和keydown
- 如何区别两个【不带Name和Id】的按钮?
- 实现树形结构的代码(用到了XML技术) 希望你们指出更好的方法?
- 樱向各位大虾求救!!!!!!!!!!!!!!!!!!!!
- Ajax读取后台返回值respnseText为空
- 20分:用DHTML工具实现一个滚动广告的动态网页(每次变化的广告不一样)并说明其具体实现步骤
- 请问一下vbscript和javascript的优缺点以及它们的使用场合
window.open(pageurl,windowname,"alwaysLowered=yes|no,alwaysRaised=yes|no,dependent=yes|no,directoried=yes|no,height=200px,width=200px,hotkeys=yes|no,innerHeight=200px,innerWidth=200px,location=yes|no,menubar=yes|no,outerHeight=10px,outerWidth=300px,resozable=yes|no,screenX=200px,screenY=200px,scrollbars=yes|no,titlebar=yes|no,toolbar=yes|no,z-look=yes|no")
其中的yes|no可换成1|0,表示选其一。
window.open(pageurl,windowname,"alwaysLowered=yes¦no,alwaysRaised=yes¦no,dependent=yes¦no,directoried=yes¦no,height=200px,width=200px,hotkeys=yes¦no,innerHeight=200px,innerWidth=200px,location=yes¦no,menubar=yes¦no,outerHeight=10px,outerWidth=300px,resozable=yes¦no,screenX=200px,screenY=200px,scrollbars=yes¦no,titlebar=yes¦no,toolbar=yes¦no,z-look=yes¦no,left=200px,top=200px,status=yes|no,location=yes|no")
innerHeight=200px,innerWidth=200px,location=yes|no,menubar=yes|no,outerHeight=10px,outerWidth=300px,resozable=yes|no,screenX=200px,
screenY=200px,scrollbars=yes|no,titlebar=yes|no,toolbar=yes|no,z-look=yes|no,
left=200px,top=200px,status=yes|no,location=yes|no")
对象 window
语法 [windowVar=][window].open("URL","windowName",["windowFeatures"]);
参数 windowVar 是新的窗口名。用这个变量引用一个窗口的属性、方法和容器;URL定义在新窗口中打开URL;windowname是用在一个表单的TARGET属性或<A>标记的窗口名,windowName仅能包含字母或底画线;windowFeatures是线面的选项和值的用逗号分隔的列表:toolbar[=yes|no]|[=1|0] --工具条
location[=yes|no]|[=1|0] --地址栏
directories[=yes|no]|[=1|0] --指引按钮
status[=yes|no]|[=1|0] --状态条
menubar[=yes|no]|[=1|0] --菜单栏
scrollbars[=yes|no]|[=1|0] --滚动条
resizable[=yes|no]|[=1|0] --窗口尺寸是否可调
width=pixels --宽度
height=pixels --高度描述 open方法在客户端打开一个新浏览器窗口。URL参数定义在新窗口中包含的URL。如URL是空字符串,将创建一个新的、空白的窗口。例子 msgWindow=window.open("","displayWindow","menubar=yes")叶秋枫·秋枫苦雪
--------------------------------------------------------------------------------有问题请写到这里或者给我发Email,谢谢访问。
<!--
function popwinw(pageurl) {
var pp
pp=window.open(pageurl,"pop","scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=775,height=150,left=70,top=10");
return false;
}