window.showModalDialog在谷歌浏览器下无法取得返回值的解决办法。
来源:互联网 发布:墨泥模拟驾驶软件 编辑:程序博客网 时间:2024/06/08 08:34
//父页面弹出对话框代码
var result = window.showModalDialog('A.aspx', null, 'dialogWidth:600px;dialogHeight:500px;center:yes;help:no;resizable:no;status:no'); //打开模态子窗体,并获取返回值
if (result == null) { if (result == undefined) { result = window.returnValue; } if (result == null) { alert("没有获取到返回值信息。"); return; } }
//子页面返回值的方法,子页面的head里面加上<base target="_self" />防止提交的时候弹出新窗口。
$().ready(function () { if ($("#h_return").val().length > 10) { if (window.opener != undefined) {//window.opener的值在谷歌浏览器下面不为空,在IE/火狐下面是未定义,由此判断是否是谷歌浏览器 window.opener.returnValue = $("#h_return").val();//谷歌浏览器下给返回值赋值的方法 window.opener.close(); //这里必须关闭一次,否则执行下面的window.close()无法关闭弹出窗口,因为谷歌浏览器下弹出窗口是个新的window } else { window.returnValue = $("#h_return").val(); //这种赋值方法兼容IE/火狐,但不支持谷歌浏览器 } window.close(); } });
- window.showModalDialog在谷歌浏览器下无法取得返回值的解决办法。
- 处理showModalDialog在谷歌浏览器下获取不到返回值的方法
- 解决chrome浏览器无法得到window.showModalDialog返回值
- 解决chrome浏览器无法得到window.showModalDialog返回值
- window.showModalDialog的返回值
- window.showModalDialog返回值
- 关于window.showModalDialog()返回值的学习心得
- 关于window.showModalDialog()返回值的学习
- 关于window.showModalDialog()返回值的学习心得
- 关于window.showModalDialog()返回值的学习心得
- 关于window.showModalDialog()返回值的学习心得
- 关于window.showModalDialog()返回值的学习
- showModalDialog在chrome下无返回值的问题
- 谷歌浏览器Chrome不再支持showModalDialog的解决办法
- 谷歌浏览器Chrome不再支持showModalDialog的解决办法
- 谷歌浏览器Chrome不再支持showModalDialog的解决办法
- window.open() 和 window.showModalDialog() 的返回值
- window.showModalDialog()之返回值
- 让人纠结的欧宝赛飞利1.4T七座版
- [古董贴][共享]AVR通用EERPOM读写函数,兼容ICC原有的eeprom.h... http://www.amobbs.com/thread-1196774-1-1.html
- eclipse 编码设置
- vim和gedit中文乱码问题(Ubuntu12.04)
- git和github的使用
- window.showModalDialog在谷歌浏览器下无法取得返回值的解决办法。
- 进程的内存使用解析
- Linux kvm 多台虚拟机走Bridge模式 配置网桥
- 挖坑 - 之问题和技术
- 管道通信 .
- SpeechSynthesis Data Installer
- 利用hostent Structure打印ip地址
- windows安装和配置阿帕奇+PHP服务器
- struct tcphdr