<div class="modal fade" id="NoPermissionModal"> <div class="modal-dialog modal-lg" > <div class="modal-content"> <div class="modal-header"> <button type="button" data-dismiss="modal" class="close" >×</button> <h4 class="modal-title" id="NoPermissionModalLabel">结算单打印</h4> </div> <div class="modal-body"> <iframe id="NoPermissioniframe" width="100%" height="100%" frameborder="0" style="height:400px"></iframe> </div> <div class="modal-footer"> <button class="btn btn-default" type="button" onclick="doFRPrint1()"> 打印 </button> <button data-dismiss="modal" class="btn btn-default" type="button" > 关 闭 </button> </div> </div> </div> </div> function linkData(ywwuid,leixing){ //window.location.href='http://10.59.169.26/qcsczk/ReportServer?reportlet=jspr.cpt&leixing='+leixing+'&ywwuid='+ywwuid; //window.open("http://10.59.169.26/qcsczk/ReportServer?reportlet=jspr.cpt&leixing="+leixing+"&ywwuid="+ywwuid, "_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=800, height=600"); // $('#myIframe').attr('src','http://10.59.169.26/qcsczk/ReportServer?reportlet=jspr.cpt&leixing='+leixing+'&ywwuid='+ywwuid); // $('#myModal').modal('show'); var frameSrc = "http://10.59.169.26/qcsczk/ReportServer?reportlet=jspr.cpt&leixing="+leixing+"&ywwuid="+ywwuid; $("#NoPermissioniframe").attr("src", frameSrc); $('#NoPermissionModal').modal({ show: true, backdrop: 'static' }); } function doFRPrint(){ //点击打印按钮时触发 document.getElementById('NoPermissioniframe').contentWindow.contentPane.pdfPrint(); //flash打印:.contentWindow.contentPane.flashPrint(); //applet打印:.contentWindow.contentPane.appletPrint(); //服务器端打印:.contentWindow.contentPane.printReportServer(); //document.getElementById('NoPermissioniframe').contentWindow.contentPane.pdfPrint(); // $("#NoPermissioniframe")[0].contentWindow.contentPane.pdfPrint(); } 点打印按钮时会出错,这是什么原因,我这个是跨域打印的。。。。 |
0
|
|