ajax レスポンスを取得して、動的 iframe に iframe コンテンツとして表示することは可能でしょうか?
これはコードの一部です:
$('.ifrm').html('response')
<iframe class='ifrm' src="abcd.php"></iframe>
It would be a great help if anyone tells me how to do it.. Thanks!
$('iframe#myFrame').load(function(){
$(this).contents().find('div.myClass').append("Hallo, Welt!");
});
適切な URL でボタンのクリック時にこれを呼び出すことができます。
$(docIFrameId).empty().attr('src', <urlHere>, function () {
// ...
});
注: この<urlHere>
部分を適切な URL に置き換えます