开发者

document.write is stopping me from printing

开发者 https://www.devze.com 2023-01-04 05:01 出处:网络
When I create a document using javascript document.write this is an iframe then i call iframe.print() nothing happens no error and n开发者_如何学Co print dialog.

When I create a document using javascript document.write

this is an iframe

then i call iframe.print()

nothing happens no error and n开发者_如何学Co print dialog.

how can I print?

MyFrame.document.write('<html><body>'+HTMLText + '</body></html>');
document.getElementById("IFramePrint").style.display = "inline";
MyFrame.focus();
MyFrame.print();


You need to focus() on the iframe first.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号