- 热门文章:
- · 打开页面就是全屏的方法
- · javascript 实现下拉列表连动,提示:Array not defined
- · 利用javascript实现时间段的查询
- · 表单填写时用 回车 代替 TAB 的实现方式
- · javascript里类似select case 该如何用?
- · javascript里类似select case 该如何用?
- · 在javascript 里面有没有检查日期格式的函数?
- · js中with的和case的用法
- · asp的cookie本身不设置的话默认的是application的path=/,所以不设关系不大,expires要设。给你netscape...
- · html的标准里这样写的。
- · Dreamweaver 4 & UltraDev 4两个BUG(字体设置不能保存和行号显示错位)的解决方法
- · 一个DHTML的例子——3D文字
上一篇:滚动条颜色生成器IE5.5+ >>
设置open方法中的参数
Opens a new web browser window. <br>
<br>
语法<br>
[windowVar = ][window].open("URL", "windowName", ["windowFeatures"])<br>
<br>
windowVar is the name of a new window. Use this variable when referring to a window@#s properties, methods, and containership. <br>
URL specifies the URL to open in the new window. See the location object for a description of the URL components. <br>
windowName is the window name to use in the TARGET attribute of a <FORM> or <A> tag. windowName can contain only alphanumeric or underscore (_) characters. <br>
windowFeatures is a comma-separated list of any of the following options and values: <br>
<br>
toolbar[=yes|no]|[=1|0]<br>
location[=yes|no]|[=1|0]<br>
directories[=yes|no]|[=1|0]<br>
status[=yes|no]|[=1|0]<br>
menubar[=yes|no]|[=1|0]<br>
scrollbars[=yes|no]|[=1|0]<br>
resizable[=yes|no]|[=1|0]<br>
width=pixels<br>
height=pixels<br>
<br>
You may use any subset of these options. Separate options with a comma. Do not put spaces between the options. <br>
<br>
pixels is a positive integer specifying the dimension in pixels. <br>
<br>
Method of<br>
window <br>
<br>
Description<br>
The open method opens a new web browser window on the client, similar to choosing New Web Browser from the File menu of the Navigator. The URL argument specifies the URL contained by the new window. If URL is an empty string, a new, empty window is created. <br>
<br>
In event handlers, you must specify window.open() instead of simply using open(). Due to the scoping of static objects in JavaScript, a call to open() without specifying an object name is equivalent to document.open(). <br>
<br>
windowFeatures is an optional, comma-separated list of options for the new window. The boolean windowFeatures options are set to true if they are specified without values, or as yes or 1. For example, open("", "messageWindow", "toolbar") and open("", "messageWindow", "toolbar=1") both set the toolbar option to true. If windowName does not specify an existing window and you do not specify windowFeatures, all boolean windowFeatures are true by default. If you specify any item in windowFeatures, all other Boolean windowFeatures are false unless you explicitly specify them. <br>
<br>
Following is a description of the windowFeatures: <br>
<br>
toolbar creates the standard Navigator toolbar, with buttons such as "Back" and "Forward", if true <br>
location creates a Location entry field, if true <br>
directories creates the standard Navigator directory buttons, such as "What@#s New" and "What@#s Cool", if true <br>
status creates the status bar at the bottom of the window, if true <br>
menubar creates the menu at the top of the window, if true <br>
scrollbars creates horizontal and vertical scrollbars when the document grows larger than the window dimensions, if true <br>
resizable allows a user to resize the window, if true <br>
width specifies the width of the window in pixels <br>
height specifies the height of the window in pixels <br>
例子<br>
In the following example, the windowOpener function opens a window and uses write methods to display a message: <br>
<br>
function windowOpener() {<br>
msgWindow=window.open("","displayWindow","menubar=yes")<br>
msgWindow.document.write<br>
("<HEAD><TITLE>Message window</TITLE></HEAD>")<br>
msgWindow.document.write<br>
("<CENTER><BIG><B>Hello, world!</B></BIG></CENTER>")<br>
}<br>
<br>
The following is an onClick event handler that opens a new client window displaying the content specified in the file sesame.htm. The window opens with the specified option settings; all other options are false because they are not specified. <br>
<br>
<FORM NAME="myform"><br>
<INPUT TYPE="button" NAME="Button1" VALUE="Open Sesame!"<br>
onClick="window.open<br>
(@#sesame.htm@#, @#newWin@#, @#scrollbars=yes,status=yes,width=300,height=300@#)"><br>
</FORM><br>
<br>
Notice the use of single quotes (@#) inside the onClick event handler. <br>
下一篇:打开页面就是全屏的方法 >>
相关文章:
- · 如何做页面自动刷新,又不用让用户按回车键来提交数据!(大功告成)
- · javascript对象与数组参考大全1
- · javascript对象与数组参考大全2
- · 一个点击后自动滚屏的例子!
- · 一个鼠标自动移动的js例子!
- · window.showModalDialog()中有三个参数,各有什么用,请举例!
- · 三级下拉框连动的数据库版!
- · 给一个类增加属性和方法?看看这个够不够?
- · 在网页中实现OICQ里的头像选择的下拉框 (附例子)
- · 请看用javascript设置和读取cookie的简单例子.....
- · 请看被打开的子窗口继承父窗口定义的styleSheets的例子
- · 经常有人询问如何用javascript判断日期是否有效,我以前也遇到过,不过后来得高人指点解决了,贴出来大...
- · ShowModalDialog的具体用法
- · 下拉式互动列表框(EC潮流网同学录之真情留言板使用的代码)
- · MSGBOX返回值
- · js中几种去掉字串左右空格的方法,请看
- · VBSctipt 5.0中的新特性
- · Jscript 5.0中的新特性
- · 加快 DHTML 的一组技巧(Copy from Microsoft)
- · 一个不太让人讨厌的自动弹出窗口:)
- · 一个把数字转英文的实用程序
- · rollarea.js及其用法示例
- · 下拉框连动的小例子(.htm版)
- · 判断访问者的浏览器是否支持javascript和Cookies
- · 在Windows桌面上使用WSH接收邮件 (转)
- · HTML4.0的 Access Key
- · 绝对是好东西 (select1 <==> select2):
- · 一个类似vbscript的round函数的javascript函数
- · 用javascript检查yyyy-mm-dd格式的正确源码。
- · HEAD元素使用集锦 (转)
- · 脚本控制Frame (转)
- · vbscript错误代码及对应解释大全
- · jscript错误代码及相应解释大全
- · 打开最大化窗口的一点经验
- · 无偿贡献,进入页面后自动刷新一次
- · 庆祝 Joy ASP 上贴数超过800页!!! 送给大家一个小礼物 ^_^
- · 自己动手,结合javascript和dhtml做一个ubb编辑器(附例子代码)
- · 选择最快的镜像站点
