ユーザーがボタンをクリックした後にiframeが読み込まれているかどうかを確認しようとしています。iframeが読み込まれているかどうかを検出するにはどうすればよいですか?
私は
$('#MainPopupIframe').load(function(){
console.log('load the iframe')
//the console won't show anything even if the iframe is loaded.
})
HTML
<button id='click'>click me</button>
//the iframe is created after the user clicks the button.
<iframe id='MainPopupIframe' src='http://...' />...</iframe>
任意の提案がありますか?
ところで、私のiframeは動的に作成されます。最初のページの読み込みでは読み込まれません。
[クリック](http://stackoverflow.com/questions/205087/jquery-ready-in-a-dynamically-inserted-iframe) –