易截截图软件、单文件、免安装、纯绿色、仅160KB

JavaScript打开新窗口


语法
oNewWindow = window.open( [sURL] [, sName] [, sFeatures] )
sURL 可选. URL 字符串 . 如果URL为空, 将以about:blank打开.
sName 可选. 字符串 描述打开窗口的名字(name). 可以做为form 和 a 标签的TARGET属性值 .
sFeatures 可选. 字符串 格式如"fullscreen=yes,toolbar=yes".channelmode = { yes | no | 1 | 0 } 是否以频道模式打开. 默认值 no.
参数
directories = { yes | no | 1 | 0 } 是否打开连接按钮. 默认值 yes.
fullscreen = { yes | no | 1 | 0 } 是否以全屏方式打开. 默认值 no. ALT+F4 可关闭. 测试中发现如果值为3,5,7....等时,可以显示横向渐变条.
height = number 设置窗口高度;
left = number 窗口离屏幕左方的距离,必须大于0.
location = { yes | no | 1 | 0 } 是否显示连接栏, 默认值 yes.
menubar = { yes | no | 1 | 0 } 是否显示菜单栏. 默认值 yes.
resizable = { yes | no | 1 | 0 } 窗口是否可调整. 默认值 yes.
scrollbars = { yes | no | 1 | 0 } 是否显示滚动条. 默认值 yes.
status = { yes | no | 1 | 0 } 是否显示状态栏. 默认值 yes.
titlebar = { yes | no | 1 | 0 } 是否显示标题栏. 可能被忽略除非正在调用的源是一个 HTML Application 或一个可信赖的会话窗口. 默认值 yes.
toolbar = { yes | no | 1 | 0 } 是否显示后退, 前进 ,停止 等按钮钮. 默认值 yes.
top = number 窗口离屏幕顶部的距离. 必须大于 0.
width = number 设置窗口的宽度. 最小值 100.
返回值
返回一个 window 对象的引用.


相关文档:

对于JavaScript的 Stack overflow at line 错误总结

对于JavaScript的 Stack overflow at line 错误总结
该错误只在IE中出现,出现该提示的原因主要有两种:
     1. 重定义了系统的触发事件名称作为自定义函数名如:  onclick / onsubmit ...  都是系统保留的事件名称,不允许作为重定义函数名称。
     2. ......

JavaScript的日期处理

var myDate = new Date();
myDate.getYear();        //获取当前年份(2位)
myDate.getFullYear();    //获取完整的年份(4位,1970-????)
myDate.getMonth();       //获取当前月份(0-11,0代表1月)
myDate.getDate();    ......

javascript refresh page 几种页面刷新的方法

Javascript刷新页面的几种方法:
1    history.go(0)
2    location.reload()
3    location=location
4    location.assign(location)
5    document.execCommand('Refresh')
6    window.navigate(location)
7& ......

JavaScript字符串函数大全


JS自带函数
concat
将两个或多个字符的文本组合起来,返回一个新的字符串。
var a = "hello";
var b = ",world";
var c = a.concat(b);
alert(c);
//c = "hello,world"
indexOf
返回字符串中一个子串第一处出现的索引(从左到右搜索)。如果没有匹配项,返回 -1 。
var index1 = a.indexOf("l");
//index1 = 2 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号