zoukankan      html  css  js  c++  java
  • 弹窗添加数据后实现父级页面同步添加

    弹窗:

    function openUrl() {
    var iWidth = 800;
    var iHeight = 600;
    return window.open('<%= Application["rootURL"] %>AP_ImageIndexing/Indexing/AddPo.aspx', 'AddPO', 'width=' + iWidth + ',height=' + iHeight + ', top=' + (screen.height - iHeight) / 2 + ', left=' + (screen.width - iWidth) / 2 + ',resizable=1,scrollbars=1');
    }

    数据回调:

    //获取并设置父级元素,这种是asp.net获取ID的方式
    $("[id$=add_polist_value]", window.opener.parent.document).val(value2);

    原理:在父级页面设置一个隐藏标签,子页面获取该ID并赋值,这样就完成了子页面向父级页面通信。

    父页面给子页面传值一般通过URL地址附带!

    子页面完成操作后父页面刷新:

    window.opener.parent.document.forms[0].submit();

  • 相关阅读:
    Python中的赋值(复制)、浅拷贝与深拷贝
    review
    Python网络编程
    云计算网络 ASW DSW CSW LSW
    Python文件操作 I/O
    RSI 指标
    python 常见模块
    Python模块和包
    读利弗莫尔
    GDP、CPI、M2
  • 原文地址:https://www.cnblogs.com/it-xcn/p/6061718.html
Copyright © 2011-2022 走看看