居中 window.open 与 window.showModalDialog
来源:互联网 发布:大学生支教后收获数据 编辑:程序博客网 时间:2024/05/22 04:31
var iWidth = window.screen.availWidth - 350; //弹出窗口的宽度;
var iHeight = window.screen.availHeight - 350; //弹出窗口的高度;
var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置;
var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1;
if (isChrome) {
window.open(url, name, 'height=' + iHeight + ',width=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no,status=no')
} else {
window.showModalDialog(url, name, "dialogWidth=" + iWidth + "px;dialogHeight=" + iHeight + "px;dialogLeft=" + iLeft + "px");
}
var iHeight = window.screen.availHeight - 350; //弹出窗口的高度;
var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置;
var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1;
if (isChrome) {
window.open(url, name, 'height=' + iHeight + ',width=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no,status=no')
} else {
window.showModalDialog(url, name, "dialogWidth=" + iWidth + "px;dialogHeight=" + iHeight + "px;dialogLeft=" + iLeft + "px");
}
0 0
- 居中 window.open 与 window.showModalDialog
- window.open与window.showModalDialog
- window.open与showModalDialog
- window.showModalDialog与window.open全屏显示
- window.showModalDialog与window.open全屏显示
- window.open 与 window.showModalDialog比较
- window.showModalDialog与window.open全屏显示
- window.open 与 window.showModalDialog比较
- window.open 与 window.showModalDialog比较
- window.showModalDialog 与window.open传递参数
- window.open 与 window.showModalDialog比较
- window.open()与window.showModalDialog区别
- window.open()与window.showModalDialog区别
- window.open()与window.showModalDialog区别
- window.showModalDialog与window.open 用法
- window.open,window.showModalDialog用法
- window.showModalDialog() and window.open()
- window.open()变成window.showmodaldialog()
- Java violate变量
- android通过命令行启动app-
- 字节,字符 编码
- [线程]——线程同步与锁定1_synchronized
- Linux 打包&解压
- 居中 window.open 与 window.showModalDialog
- Python爬虫学习系列教程
- 【Java学习-J.160411.0.7】笔记6-Java语言特点及数据类型
- Objective-C 和 Core Foundation 对象相互转换的内存管理总结
- ios: 画虚线
- cURL 和 Wget 的优缺点各是什么
- android测试指南
- 初学SpringMVC(阅读了解)
- 剑指offer系列之14:反转链表