<!DOCTYPE html>或者使用兼容模式试试

解决方案 »

  1.   

    今天也遇到了IE11的问题, 返回值倒是有,但是赋值给父页面之后,父页面会自动刷新下,然后又没了
    IE6、IE7、IE9下测试都是没问题的
      

  2.   

    子窗口:window.opener.returnValue = "opener returnValue";主窗口:returnValue = window.returnValue;     试试这个,印象中可以的!不过需要根据浏览器做接判断。
      

  3.   

    急需此问题的答案,准确的说ie11设置兼容性后就可以了,但是 webbrowser 不行,急求答案
      

  4.   

    在网页的head中加上
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
    或者
    <meta http-equiv="X-UA-Compatible" content="IE=8" >
      

  5.   

    http://bbs.csdn.net/topics/390348798
    看看是不是这个原因
      

  6.   

    这个问题,是这几天,win8.1升级后才出现的,可能ie内核有所更新
      

  7.   

    不是9楼的答案,返回值的变量没有用 returnValue
      

  8.   

    为什么uc浏览器的兼容模式也可以呢?webbrowser就不行,是不是有什么设置
      

  9.   

    参考http://hi.baidu.com/282919088/item/21c5728e8570355c27ebd906
      

  10.   

    通过安装微软12月17日发布的更新补丁kb3025390,已经顺利解决kb3008923这一更新包致使ie11中 window.showModalDialog返回值为undefined的问题,楼主不妨试一试。
      

  11.   

    我也遇到这问题了,,,但我是通过showModalDialog与open 的异常处理解决的
      

  12.   

    这兼容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() ;
    }
      

  13.   

    这兼容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() ;
    }