在IE11 下面 js window.showModalDialog返回值为undefined <!DOCTYPE html>或者使用兼容模式试试 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 今天也遇到了IE11的问题, 返回值倒是有,但是赋值给父页面之后,父页面会自动刷新下,然后又没了IE6、IE7、IE9下测试都是没问题的 子窗口:window.opener.returnValue = "opener returnValue";主窗口:returnValue = window.returnValue; 试试这个,印象中可以的!不过需要根据浏览器做接判断。 急需此问题的答案,准确的说ie11设置兼容性后就可以了,但是 webbrowser 不行,急求答案 在网页的head中加上<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >或者<meta http-equiv="X-UA-Compatible" content="IE=8" > http://bbs.csdn.net/topics/390348798看看是不是这个原因 这个问题,是这几天,win8.1升级后才出现的,可能ie内核有所更新 不是9楼的答案,返回值的变量没有用 returnValue 为什么uc浏览器的兼容模式也可以呢?webbrowser就不行,是不是有什么设置 参考http://hi.baidu.com/282919088/item/21c5728e8570355c27ebd906 通过安装微软12月17日发布的更新补丁kb3025390,已经顺利解决kb3008923这一更新包致使ie11中 window.showModalDialog返回值为undefined的问题,楼主不妨试一试。 我也遇到这问题了,,,但我是通过showModalDialog与open 的异常处理解决的 这兼容IE,360,火狐,google等游览器哦 弹出页面是这样写:function selectClassify(id) { var iTop = (window.screen.availHeight-30-570)/2; //获得窗口的垂直位置; var iLeft = (window.screen.availWidth-10-700)/2; //获得窗口的水平位置; try{//IE var returnValue = window.showModalDialog(window.ctx + "/enterpriseClassify/getAll?id="+id,window,"status:no;scroll:yes;center:yes;dialogHeight:570px;dialogWidth:700px;help:no"); if(returnValue != null ){ setValue(returnValue.name); } }catch(e){ //非IE window.open(window.ctx + "/enterpriseClassify/getAll?id="+id, 'newwindow','height=570,width=700,top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no'); } };//setValue是自己定义的赋值方法哦! function setValue(name){ $("#classifyName").val(name); };处理结果的页面我是这样写:function getReturnValue(name){ try{ window.opener.setHouseValue(name) ; }catch( e ){//IE window.returnValue = { name: name } ; } window.close() ;} 这兼容IE,360,火狐,google等游览器哦 弹出页面是这样写:function selectClassify(id) { var iTop = (window.screen.availHeight-30-570)/2; //获得窗口的垂直位置; var iLeft = (window.screen.availWidth-10-700)/2; //获得窗口的水平位置; try{//IE var returnValue = window.showModalDialog(window.ctx + "/enterpriseClassify/getAll?id="+id,window,"status:no;scroll:yes;center:yes;dialogHeight:570px;dialogWidth:700px;help:no"); if(returnValue != null ){ setValue(returnValue.name); } }catch(e){ //非IE window.open(window.ctx + "/enterpriseClassify/getAll?id="+id, 'newwindow','height=570,width=700,top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no'); } };//setValue是自己定义的赋值方法哦! function setValue(name){ $("#classifyName").val(name); };处理结果的页面我是这样写:function getReturnValue(name){ try{ window.opener.setValue(name) ; }catch( e ){//IE window.returnValue = { name: name } ; } window.close() ;} 系统服务的进度条,哪位仁兄帮帮忙啊 C#曲线拟合算法 怎么用C#注册三键组合的全局快捷键 在线等 未将对象引入实例 c# office word 光标定位 求C# 给word插入页眉的方法 文件讀取求救阿!壹佰分在線奉送 用C#读写XML实例?怎么写? 安装.NET Framwork2.0 时出现的问题(已安装1.1,系统为Windows2003) 一个无法理解的错误。。 gridcontrol 设置列的值 vs2008连接不上数据库
IE6、IE7、IE9下测试都是没问题的
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
或者
<meta http-equiv="X-UA-Compatible" content="IE=8" >
看看是不是这个原因
弹出页面是这样写:
function selectClassify(id) {
var iTop = (window.screen.availHeight-30-570)/2; //获得窗口的垂直位置;
var iLeft = (window.screen.availWidth-10-700)/2; //获得窗口的水平位置;
try{//IE
var returnValue = window.showModalDialog(window.ctx + "/enterpriseClassify/getAll?id="+id,window,"status:no;scroll:yes;center:yes;dialogHeight:570px;dialogWidth:700px;help:no");
if(returnValue != null ){
setValue(returnValue.name);
}
}catch(e){ //非IE
window.open(window.ctx + "/enterpriseClassify/getAll?id="+id, 'newwindow','height=570,width=700,top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
}
};
//setValue是自己定义的赋值方法哦!
function setValue(name){
$("#classifyName").val(name);
};处理结果的页面我是这样写:
function getReturnValue(name){
try{
window.opener.setHouseValue(name) ;
}catch( e ){//IE
window.returnValue = {
name: name
} ;
}
window.close() ;
}
弹出页面是这样写:
function selectClassify(id) {
var iTop = (window.screen.availHeight-30-570)/2; //获得窗口的垂直位置;
var iLeft = (window.screen.availWidth-10-700)/2; //获得窗口的水平位置;
try{//IE
var returnValue = window.showModalDialog(window.ctx + "/enterpriseClassify/getAll?id="+id,window,"status:no;scroll:yes;center:yes;dialogHeight:570px;dialogWidth:700px;help:no");
if(returnValue != null ){
setValue(returnValue.name);
}
}catch(e){ //非IE
window.open(window.ctx + "/enterpriseClassify/getAll?id="+id, 'newwindow','height=570,width=700,top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
}
};
//setValue是自己定义的赋值方法哦!
function setValue(name){
$("#classifyName").val(name);
};处理结果的页面我是这样写:
function getReturnValue(name){
try{
window.opener.setValue(name) ;
}catch( e ){//IE
window.returnValue = {
name: name
} ;
}
window.close() ;
}