有谁知道是否有这样的事情?
我有一个插入的iframe,$.ajax()我想在iframe的内容完全加载后做一些事情:
....
success: function(html){ // <-- html is the IFRAME (#theiframe)
$(this).html(html); // $(this) is the container element
$(this).show();
$('#theiframe').load(function(){
alert('loaded!');
}
....
Run Code Online (Sandbox Code Playgroud)
它工作,但我看到IFRAME被加载两次(警报也显示两次).