开发者

How do I update content in the parent window of the Iframe I am in with jQuery

开发者 https://www.devze.com 2023-01-24 10:09 出处:网络
If I am inside the contents of iframe_2 how do I change the text of 开发者_开发百科header_2? <h3 id=\"header_1\"></h3>

If I am inside the contents of iframe_2 how do I change the text of 开发者_开发百科header_2?

<h3 id="header_1"></h3>
<iframe id="iframe_1"></iframe>
<h3 id="header_2"></h3>
<iframe id="iframe_2"></iframe>
<h3 id="header_3"></h3>
<iframe id="iframe_3"></iframe>


Worked it out.

$("h3#header2", parent.document).text("new text");
0

精彩评论

暂无评论...
验证码 换一张
取 消