Getting iframe content with $() (update: In mootools)?
how do i minify this in mootools.
window.f开发者_Python百科rames['buffer'].document.body.innerHTML
in mootools, this does not work:
$('buffer').$('body').get('html');
OR
$('buffer').get('html')
As long as your page and iframe are in the same domain you should be able to use the following:
new IFrame('buffer').contentDocument.getElement('body').get('html');
$('#iframeId').contents().html();
should work, it seems.
See: http://api.jquery.com/contents/
edit: actually, I ran the following code on the above site and it works:
var s = $('iframe:first').contents().find('*').html()
精彩评论