开发者

Call Child window function from parent window javascript

On my xyz.aspx page I added a Iframe and set it src to abc.aspx page, when I load xyz page 开发者_StackOverflow社区Iframe is alos loaded as well abc.aspx page inside it. I am able to call a function from abc.aspx to xyz.aspx function, the question is how can I call abc.aspx function from my xyz.aspx page?

Thanx


I hope, the following solution will help you:

Parent to iframe:

document.getElementById('yourframe').contentWindow.yourFunction();

Iframe to parent:

parent.yourFunction();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜