易截截图软件、单文件、免安装、纯绿色、仅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表单验证代码

表单的客户端javascript验证有各种各样的写法,登录为form的onsubmit事件或submit按扭写一个函数。对于小表单(只有一两个表单域的表单)就不必再专门再用javascript写一个验证函数了,只需要在form的onsubmit事件里加上:
onsubmit=”return domainname.value==”?(alert(’请输入搜索内容’),false ......

简洁强大的JavaScript表单验证程序

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>vForm表单验证程 ......

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& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号