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');
精彩评论