iframe(ヘッダーなしのiframe)の一部を切り取って表示するスクリプトがあります。私の問題は、このiframe内でアクションを実行すると、iframeはリロードしますが、jqueryフィルタリングを適用してその部分だけを提供しませんが、instadはヘッダー付きのすべてのページを提供するため、リロード時にスクリプトが機能しないと想定しています。 iframeを含むメインページのウィンドウリロードなしのiframe:
<iframe class="test" width="100%" height="100%" src="/message.html?msjId=260" style="height:100%;width:100%;">
$(window).load(function () {
$('.test').each(function(){
var filteredContents1 = $(this).contents().find('.div_iframe').html();
$(this).contents().find('body').html(filteredContents1);
});
});
解決策はありますか?