博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
showModalDialog改进版,包括Chrome下的特殊处理
阅读量:4612 次
发布时间:2019-06-09

本文共 835 字,大约阅读时间需要 2 分钟。

父页面:

    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();

转载于:https://www.cnblogs.com/songjinduo/p/4832407.html

你可能感兴趣的文章
IP报文格式及各字段意义
查看>>
(转载)rabbitmq与springboot的安装与集成
查看>>
C2. Power Transmission (Hard Edition)(线段相交)
查看>>
STM32F0使用LL库实现SHT70通讯
查看>>
Atitit. Xss 漏洞的原理and应用xss木马
查看>>
MySQL源码 数据结构array
查看>>
(文件过多时)删除目录下全部文件
查看>>
T-SQL函数总结
查看>>
python 序列:列表
查看>>
web移动端
查看>>
pythonchallenge闯关 第13题
查看>>
个人介绍
查看>>
使用python动态特性时,让pycharm自动补全
查看>>
MySQL数据库免安装版配置
查看>>
你必知必会的SQL面试题
查看>>
html5 Canvas绘制时钟以及绘制运动的圆
查看>>
云推送注意(MSDN链接)
查看>>
OpenMobile's Application Compatibility Layer (ACL)
查看>>
竞价广告系统-广告检索
查看>>
Metro Style app :浏览器扩展
查看>>