专注于jquery中的父窗口

时间:2015-11-07 11:55:24

标签: jquery

如何在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();
                }); 
        });

0 个答案:

没有答案