jQuery: receive document ready() on child window
问题 I'm trying to get notified when the child window I'm opening has its document loaded and ready. This doesn't seem to work: win = window.open(href, 'test', 'width=300, height=400'); win.focus(); $(win.document).ready(function() { // Ok, the function will reach here but if I try to manipulate the // DOM it doesn't work unless I use breakpoints $(this).contents().find("...").doStuff(); // nothing happens }); What do I have to do? 回答1: Have you tried this? — $(win.document).ready(function() { $