zoukankan      html  css  js  c++  java
  • 解决chrome浏览器无法得到window.showModalDialog返回值的问题

    父页面处理:

    function ProductList()
    {
       var TypeID = window.document.getElementById("Type").value;
       var returnvalues = window.showModalDialog('ProductList.aspx?Type=' + TypeID,'window','dialogWidth=700px;dialogHeight=680px');
       if(returnvalues!=undefined){
           window.document.getElementById("test").value=returnvalues;
       }

       else{//解决chrome浏览器无法得到window.showModalDialog返回值的问题
          window.document.getElementById("test").value=window.returnValue;

       }
    }

    子页面处理:

     

    function Button_Submit_onclick()
    {
        if (window.opener != undefined) {
           //解决chrome浏览器无法得到window.showModalDialog返回值的问题
           window.opener.returnValue ="opener returnValue";
        }
        else {
           window.returnValue="window returnValue";
        }
        window.close();
    }

     

  • 相关阅读:
    元类、orm
    MySQL进阶
    python操作mysql
    tf矩阵基础
    tensorflow安装时遇到的问题
    Loading
    弹球落地
    3dMenu
    响应式布局:flex
    渐变linear-gradient
  • 原文地址:https://www.cnblogs.com/c-y-across-I/p/3793313.html
Copyright © 2011-2022 走看看