IE浏览器弹出窗口
//弹出一个对话框 参数的顺序: url, iWidth, iHeight, vArguments
function openDialog() {
var url, len = arguments.length, sFeatures, ret;
if (len == 1) {
url = arguments[0];
var iWidth = 800; //弹出窗口的宽度;
var iHeight = 600; //弹出窗口的高度;
return window.showModalDialog(url, "", "dialogWidth=" + iWidth + "px;dialogHeight=" + iHeight + "px;status=no;");
}
else {
url = arguments[0];
iWidth = arguments[1];
iHeight = arguments[2];
sFeatures = "dialogWidth=" + iWidth + "px;dialogHeight=" + iHeight + "px;status=no;";
if (len == 3) ret = window.showModalDialog(url, "", sFeatures);
else if (len == 4) ret = window.showModalDialog(url, arguments[3], sFeatures);
return ret;
}
}
//弹出一个新窗口 isres:是否可调整大小
function windowOpen(url, iWidth, iHeight, isres) {
var iTop = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置;
var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
var rs;
if (isres == undefined) rs = 'no';
else rs = 'yes';
window.open(url, "_blank", 'height=' + iHeight + ',width=' + iWidth + ',top=' + iTop + ',left=' + iLeft +
',toolbar=no,menubar=no,scrollbars=no,resizable=' + rs + ',location=no,status=no ');
}
用法
openDialog('/test/test3.aspx?r=' + Math.random(), 1200, 600, window);//打开对话框
windowOpen('/test/test3.aspx?r=' + Math.random(), 1200, 600);//打开新窗口
openDialog()这种方法已经不适用了,多数浏览器已经不支持,只有IE模式下支持
IE浏览器弹出窗口的更多相关文章
- Js 根据不同浏览器弹出窗口
/// <reference path="intellisense/jquery-1.2.6-vsdoc.js" /> var userAgent = navigato ...
- window.open()弹出窗口防止被禁
window.open(),顾名思义,是指在当前浏览器窗口弹出另一个浏览器窗口. 因为多种原因,浏览对window.open弹出的窗口做了多方限制.限制不同,肯定会造成各浏览器弹出窗口的差异. 大部分 ...
- chrome浏览器上传图片反应很慢,延迟很久才弹出窗口
chrome浏览器上传图片反应很慢,延迟很久才弹出窗口 一个上传图片的控件,点击按钮上传图片,用chrome(谷歌浏览器)时,点击按钮后,要等好几秒才弹出文件选择窗口 可以试一下,把网络断开,这个问题 ...
- jqueryeasyUI dialog 弹出窗口超出浏览器,导致不能关闭的bug解决方案
jqueryeasyUI dialog 弹出窗口超出浏览器,导致不能关闭的bug解决方案 2014年8月30日 3233次浏览 相信很多前端朋友都用过jqueryeasyUI,jqueryeasyUI ...
- java selenium (十二) 操作弹出窗口
selenium 中如何处理弹出窗口 阅读目录 原理 在代码里, 通过 Set<String> allWindowsId = driver.getWindowHandles ...
- JSP弹出窗口和模式对话框
本文转载于其它blog,在此向本文原创者,致意! JSP 弹出窗口 一.window.open() 基础知识 1.window.open()支持环境: JavaScript1.0+ ...
- [转]js来弹出窗口的详细说明
1.警告对话框 <script> alert("警告文字") </script> 2.确认对话框 <script> confirm(" ...
- 【CefSharp】 禁用右键菜单 与 控制弹出窗口的方式(限版本39.0.0.1)
这周没什么时间,一开始就在忙一些CefSharp的事情,Win10的研究就放了下来,CefSharp的资料挺少的,但好在是开源的,可以我们便宜的折腾.因为两个的内容都不多,我就合成一篇文章啦. 这还里 ...
- jquery-通过js编写弹出窗口
本文转载 本文主要是通过js动态控制div的高度,css控制浮动 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional// ...
随机推荐
- Notepad++ QuickText 插件的 HTML 配置: \Notepad++\plugins\Config\QuickText.ini
# 缩写的注解 abbr=<abbr title=''>$</abbr> # 覆盖默认的文本方向 bdo=<bdo dir='rtl'>$</bdo> ...
- Spring 简单描述
摘抄自知乎 建议不要硬着头皮看spring代码,本身的代码800多m,就是不上班开始看也不知道什么时候看完.如果想学学ioc,控制反转这些建议看看jodd项目,比较简练,但是我仍然不建议过多的看这些框 ...
- SHA-1算法c语言实现
安全哈希算法(Secure Hash Algorithm)主要适用于数字签名标准 (Digital Signature Standard DSS)里面定义的数字签名算法(Digital Signatu ...
- cocos2d-x中对象的位置,旋转,缩放
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/cuit/article/details/26729633 分为两种: 缓动.IntervalActi ...
- Java for LeetCode 111 Minimum Depth of Binary Tree
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shor ...
- Window7 环境下 MariaDB 的安装 及使用
MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可.开发这个分支的原因之一是:甲骨文公司收购了MySQL后,有将MySQL闭源的潜在风险,因此社区采用分支的方 ...
- POJ 2348 Euclid Game (模拟题)
Euclid's Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7942 Accepted: 3227 Des ...
- Warning: Cannot send session cookie – headers already sent…
相信大多数人在写PHP代码的时候,都遇到过类似 "Warning: Cannot send session cookie – headers already sent…“或者”Cannot ...
- 算法(Algorithms)第4版 练习 1.3.25 1.3.24
代码实现: //1.3.24 /** * remove the node following the node x * (and does nothing if the argument or the ...
- 算法(Algorithms)第4版 练习 1.3.27 1.3.28
代码实现: //1.3.27 /** * return the value of the maximum key in the list * * @param list the linked list ...