Firefox for Android不能使用window.print()

时间:2018-11-29 09:25:46

标签: javascript firefox odoo odoo-10

enter image description here JavaScript函数:

var printContent = document.getElementById('printDiv');
var windowUrl = 'about:blank';
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName,'left=50000,top=50000,width=0,height=0');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();

如果使用桌面浏览器运行良好 谢谢你的回答

0 个答案:

没有答案