开发者

jquery top.document or not?

I have a page called loader.htm开发者_高级运维l. It contains an iframe, which contains jQuery.

On index.html, I do <iframe src="loader.html">

How do I access the elements inside loader.html ? top.document ?


Use the contents() method:

$('iframe').contents().find('body');
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜