Get html contents from iframe using jquery

The following code works fine in all browsers for getting HTML contents from iframe.

var iFrameHTML= $('#iframe_id').contents().find('body').html();
alert(iFrameHTML);

Leave a Reply

Your email address will not be published. Required fields are marked *