如何在jquery,javascript
中关注父窗口 $(document).ready(function(){
$(window).click(function(){
var a = $('#dialog').clone().html();
var yourDOCTYPE = "<!DOCTYPE html>";
var printPreview = window.open('about:blank', 'print_preview', "menubar=1,resizable=1,width=1024,height=600");
var printDocument = printPreview.document;
printDocument.open();
printDocument.write(yourDOCTYPE+ "<html>"+ a + "</html>");
printPreview.focus();
$(this).focus();
});
});