zoukankan      html  css  js  c++  java
  • iframe父子页面间互相调用方法和属性

    <iframe src="VideoController.do?videoPlay" name="topFrame" ></iframe> 

    topFrame 是父级页面iframe的name属性

    1、父级页面调用子级页面

    (1)父级页面调用子级页面方法 

      topFrame.window.子级页面方法();

    (2)父级页面调用子级页面属性    获取值、显示隐藏、变量

      topFrame.window.document.getElementById("back").style.display="block";

      topFrame.window.document.getElementById("back").innerText;

      topFrame.window.document.getElementById("back").value;

      topFrame.window.cId;

    2、子级页面调用父级页面

    (1)子级页面调用父级页面方法

      window.parent.父级页面方法();

    (2)子级页面调用父级页面属性    获取值、显示隐藏、变量

      twindow.parent.document.getElementById("PtzPreset1").style.display="block";

      window.parent.document.getElementById("PtzPreset1").innerText;

      window.parent.document.getElementById("back").value;;

      window.parent.cId;

  • 相关阅读:
    topcoder srm 320 div1
    topcoder srm 325 div1
    topcoder srm 330 div1
    topcoder srm 335 div1
    topcoder srm 340 div1
    topcoder srm 300 div1
    topcoder srm 305 div1
    topcoder srm 310 div1
    topcoder srm 315 div1
    如何统计iOS产品不同渠道的下载量?
  • 原文地址:https://www.cnblogs.com/dxt510/p/10432043.html
Copyright © 2011-2022 走看看