js弹出窗口
2024-09-04 15:52:58
function openModalDialog(url, height, width) {
var t_height = 400;
var t_width = 600;
if (!isNaN(height)) {
t_height = height;
}
if (!isNaN(width)) {
t_width = width;
}
showModalDialog(url, 'newwindow',
'dialogWidth:' + t_width + 'px;dialogHeight:' + t_height + 'px;center:yes;help:yes;resizable:no;status:no')
} function openModelessDialog(url, height, width) {
var t_height = 400;
var t_width = 600;
if (!isNaN(height)) {
t_height = height;
}
if (!isNaN(width)) {
t_width = width;
}
showModelessDialog(url, 'newwindow',
'dialogWidth:' + t_width + 'px;dialogHeight:' + t_height + 'px;center:yes;help:yes;resizable:no;status:no')
} function openWindow(url, height, width) {
var t_height = 400;
var t_width = 600;
if (!isNaN(height)) {
t_height = height;
}
if (!isNaN(width)) {
t_width = width;
}
var left = (window.screen.width - t_width) / 2;
var top = (window.screen.height - t_height) / 2;
window.open(url, 'newwindow',
'resizable=no,height=' + t_height + ',width=' + t_width + ',top=' + top + ',left=' + left + ',titlebar=no ,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
}
程序员的基础教程:菜鸟程序员
最新文章
- Python 中xrange和range区别
- 解决gradle /Users/xxxx/Documents/workspace/fontmanager/.gradle/2.2.1/taskArtifacts/cache.properties (No such file or directory)报错办法
- Linux redirect the stdout to a file
- HDU5777 domino (BestCoder Round #85 B) 思路题+排序
- msp时钟设置程序
- 样式优先级、margin
- Mysql分页查询
- 编写SQL
- 小米1S iptables禁止443端口
- assert 实现分析
- OBJECT和EMBED标签
- Aseprite入门:第一个gif动图
- 如何让windows更高效?
- js处理想要得到数据结构
- 20155323 第四次实验 Android程序设计实验报告
- TypeScript学习笔记—函数
- Java学习之Dubbo+ZooKeeper分布式服务Demo
- 《C#多线程编程实现方式》
- client , offset , scroll 系列 及百度导航栏案例
- codeforce Gym 100342H 	Hard Test (思考题)