need like foreach in jQuery to take all the divs from all the iframes
问题 so the code that extracts the div from the iframe is made by @Adil like this: $(window).load(function () { var filteredContents = $('.test').contents().find('.div_iframe').html(); $('.test').contents().find('body').html(filteredContents); }); HTML looks like this: <iframe class="test" width="100%" height="100%" src="/message.html?msjId=268" style="height:100%;width:100%;"> <iframe class="test" width="100%" height="100%" src="/message.html?msjId=260" style="height:100%;width:100%;"> and the