zoukankan      html  css  js  c++  java
  • jQuery iframe之间相互调用

    1,子iframe内调用父类函数方法:
    
    window.parent.func();
    
     
    
    2,子Iframe中获取父界面的元素:
    
    $("#xx", window.parent.document);
    
    这个xx就是父界面中要获取的元素的ID。
    
     
    
    3,jquery 调用子iframe页面中js的方法:
    
     iframefunction()是子页面的方法
    
      $(window.parent.document).contents().find("#iframename")[0].contentWindow.iframefunction(); 
  • 相关阅读:
    词根——rect
    6
    7
    5
    3
    4
    2
    1
    DBUtils
    Websocket
  • 原文地址:https://www.cnblogs.com/genghuilove/p/6169167.html
Copyright © 2011-2022 走看看