zoukankan      html  css  js  c++  java
  • showModalDialog改进版,包括Chrome下的特殊处理

    父页面:

        if(window.ActiveXObject){ //IE  
            $("#choose_entp").click(function(){  
                var returnValue = window.showModalDialog("SelectEntpInfo.do?mod_code=${af.map.mod_code}&xxx=" + Math.random(), window, "dialogWidth:630px;status:no;dialogHeight:440px");  
                if(returnValue != null ){  
                    setValue(returnValue.id,returnValue.name);  
                }  
            });  
        }else{  //非IE  
            $("#choose_entp").click(function(){  
                window.open("SelectEntpInfo.do?mod_code=${af.map.mod_code}&xxx=" + Math.random(), 'newwindow','height=440,width=630,top=150,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');  
            });  
        }  
          
        function setValue(id,name){  
            $("#entp_id").val(id);  
        }

    子页面处理:

                    if(window.ActiveXObject){ //IE  
                        window.returnValue = str ;
                    }else{ //非IE  
                        if(window.opener) {  
                            window.opener.setValue(str) ;  
                        }  
                    }

                    window.close();

  • 相关阅读:
    Vue中调用另一个组件中自定义事件
    docker下安装MySQL
    docker下安装Redis
    .NET Core简介
    Object(Asp.NET核心机制内置对象汇总)
    .NET MVC5简介(六)HttpHandler
    .NET MVC5简介(五)管道处理模型IHttpModule
    hibernate有什么作用
    hibernate编写时没有提示
    触发器insert
  • 原文地址:https://www.cnblogs.com/songjinduo/p/4832407.html
Copyright © 2011-2022 走看看