开发者

Dynamic Iframe printing

开发者_如何学Go

I want to dynamically set the content of an iframe to that of an html document I have. It is in the form of a string in memory in javascript.

Then i want to print that iframe.

Ideas?


Yes.

var iframe = document.getElementByID("some ID");
iframe.contentDocument.write("HTML string");
iframe.contentWindow.print();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜