开发者

document.write is stopping me from printing

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜