弹出窗口关闭
dis10 2007-03-06 10:48:11 var prtContent = document.getElementById("div");
WinPrint = window.open('','','let=6000,top=6000,width=0px,height=0px,toolbar=0,scrollbars=0,status=0');
var strPrint = prtContent.outerHTML;
strPrint += "<object classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' height='0' name='WB' width='0'></object>";
strPrint = strPrint.replace(/DISPLAY: none;/g,"");
WinPrint.document.write(strPrint);
WinPrint.document.close();
WinPrint.focus();
WinPrint.document.getElementById("WB").ExecWB(7,1);
//WinPrint.print();
WinPrint.close();
把需要打印的内容放到一个弹出的页面里面,但是每次预览,都会新打开个窗体,怎么样能让该窗口自动关闭?