您的位置:首页 > 其它

window.showModalDialog相关问题小结

2017-08-09 00:00 387 查看
var width = window.screen.width;
var height =window.screen.height;

window.showModalDialog(encodeURI(url), widow,'top=1;left=1;toolbar=no;menubar=no;location=no;status=no;dialogWidth='+width+'px;dialogHeight='+height+'px;');
1.encodeURI:把字符串作为 URI 进行编码
2.url:子窗口路径
3.widow:打开子窗口提示重新登录,window可把父窗口session传给子窗口
4.参数:
dialogHeight :对话框高度,不小于100px,IE4中dialogHeight 和 dialogWidth 默认的单位是em,而IE5以上是px,为方便其见,在定义modal方式的对话框时,用px做单位。
dialogWidth: 对话框宽度。
dialogLeft: 离屏幕左的距离。
dialogTop: 离屏幕上的距离。
center: {yes | no | 1 | 0 }:窗口是否居中,默认yes,但仍可以指定高度和宽度。
help: {yes | no | 1 | 0 }:是否显示帮助按钮,默认yes。
resizable: {yes | no | 1 | 0 } 〔IE5+〕:是否可被改变大小。默认no。
status: {yes | no | 1 | 0 } 〔IE5+〕:是否显示状态栏。默认为yes[ Modeless]或no[Modal]。
scroll:{ yes | no | 1 | 0 | on | off }:指明对话框是否显示滚动条。默认为yes。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: