使用Javascript打印iFrame内容 [英] Print iFrame content using Javascript
问题描述
和
var iframe = document.getElementById(iframeID)。contentWindow;
iframe.focus();
iframe.print();
这不适用于Mozilla Firefox。
在页面上的iFrame中显示PDF。
我在fancybox的iframe中打开了PDF,然后调用 尽管它在一些较旧的浏览器中不受支持。 I want to print iFrame content using javascript. I've tried to following but it only works in Chrome. and It is not working on Mozilla Firefox. I'm showing PDF in iFrame on a page. I've opened the PDF in iframe of fancybox and then called Though it's not supported in some older browsers.
这篇关于使用Javascript打印iFrame内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
.contentWindow.print ();
。
window.frames[frameid].print();
var iframe = document.getElementById("iframeID").contentWindow;
iframe.focus();
iframe.print();
.contentWindow.print();
worked for me..contentWindow.print();
.