window.showModalDialog()方法在Chrome下不能使用的解决方法
来源:互联网 发布:80端口为什么要备案 编辑:程序博客网 时间:2024/05/16 08:09
1、用window.open()替代其弹出窗口
2、用 getBrowserType() 判断当前浏览器是什么浏览器,并作出相应处理。
function getBrowserType() {
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/msie ([\d.]+)/))return 1;
if(ua.match(/firefox\/([\d.]+)/))return 2;
if(ua.match(/chrome\/([\\d.]+)/))return 3;
if(ua.match(/opera.([\d.]+)/))return 4;
if(ua.match(/version\\/([\d.]+).*safari/))return 5;
return 0;
}
3、IE用window.returnValue 向父窗口传递参数;
Chrome用window.opener.returnValue向父窗口传递参数,并且调用 window.opener.document.all.btnGetList.click();局部舒心父窗口。
4、在父窗口定义一个控件<input type="hidden" id="btnGetList" onclick="<%=PostBack()%>" />
5、在父窗口的后台定义PostBack()方法
protected string PostBack()
{
return this.Page.GetPostBackEventReference(this.hidAdd, "getList");
}
hidAdd触发下面事件
protected void btnAdd_Click(object sender, EventArgs e)
{
this.GetList();
}
2、用 getBrowserType() 判断当前浏览器是什么浏览器,并作出相应处理。
function getBrowserType() {
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/msie ([\d.]+)/))return 1;
if(ua.match(/firefox\/([\d.]+)/))return 2;
if(ua.match(/chrome\/([\\d.]+)/))return 3;
if(ua.match(/opera.([\d.]+)/))return 4;
if(ua.match(/version\\/([\d.]+).*safari/))return 5;
return 0;
}
3、IE用window.returnValue 向父窗口传递参数;
Chrome用window.opener.returnValue向父窗口传递参数,并且调用 window.opener.document.all.btnGetList.click();局部舒心父窗口。
4、在父窗口定义一个控件<input type="hidden" id="btnGetList" onclick="<%=PostBack()%>" />
5、在父窗口的后台定义PostBack()方法
protected string PostBack()
{
return this.Page.GetPostBackEventReference(this.hidAdd, "getList");
}
hidAdd触发下面事件
protected void btnAdd_Click(object sender, EventArgs e)
{
this.GetList();
}
- window.showModalDialog()方法在Chrome下不能使用的解决方法
- window.showModalDialog()方法在Chrome下不能使用的解决方法
- showModalDialog在chrome下
- window.showModalDialog的使用
- Window.ShowModalDialog的使用
- window.showmodaldialog的使用
- JS解决chrome37+ window.showmodaldialog函数不能使用的问题
- showModalDialog在chrome下无返回值的问题
- 关于window.showmodaldialog的使用
- window.open()代替window.showModalDialog()的方法
- javascript:window.close()在chrome,Firefox下失效问题解决方法
- javascript:window.close()在chrome,Firefox下失效问题解决方法
- FreeNX 在Fedora8下不能正常使用的解决方法
- CCStudio在vista下不能使用帮助的解决方法
- 在Win7下不能使用Vs2005调试功能的解决方法
- 使chrome兼容showModalDialog的方法
- window.showModalDialog方法返回值为对象,若Dialog窗口中返回的对象为数组,会丢失数组构造信息,不能对返回值使用Array方法。
- 关于在FireFox 3.0 中showModalDialog的页面刷新window.dialogArguments引用丢失的解决方法
- 链表
- "undefined reference to" 问题解决方法
- USTCOJ 1359 查找中位数 不用排序
- [3月6日的脚本] 统计指定文件扩展名的文件数目 (PowerShell)
- dede自定义表单php验证方法之一
- window.showModalDialog()方法在Chrome下不能使用的解决方法
- bash参考手册之四(shell内建命令)续四
- iPhone开发教程 UI基础课程(58课时)
- SQL学习笔记8 ---触发器
- SQL优化-索引、查询优化及分页算法方案
- 迷宫找出路代码
- android添加开机声音
- 21个强大的Javascript框架
- [3月7日的脚本] 如何移除磁盘空间不足警告 (PowerShell)