开发者

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()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜