1.在父窗口中操作子窗口中的元素,如(其中 iframe1是iframe的ID)
1) 选中IFRAME中的所有单选钮
  $(window.frames["iframe1"].document).find("input[@type='radio']").attr("checked","true");
2).去掉子窗口中类名为top_menu元素的css属性类on
$(window.frames["iframe1"].document).find('.top_menu').removeClass("on");

2.在IFRAME中操作父窗口的元素
1) 选中父窗口中的所有单选钮
$(window.parent.document).find("input[@type='radio']").attr("checked","true");
2父窗口元素ID为_M1408加上CSS类on
$(window.parent.document).find("#_M1408").addClass("on");

iframe框架的:<iframe src="http://chenxinwen2006.blog.163.com/blog/test.html" , top.document);

父窗体调用IFrame中的方法(right)为ifram的id
document.frames["right"].expand(); 
父窗体:parent;

子窗体:opener;(window.opener.reload();)

$(window.parent.document).find("#alimamaifrm").attr("src","http://www.163.com");

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2021-12-15
猜你喜欢
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
相关资源
相似解决方案