【发布时间】:2011-11-01 13:51:16
【问题描述】:
这是我用来在内部和 iframe 中打印 pdf 的代码。 但在 Firefox 中它甚至没有响应。萤火虫没有错误。 在 chrome 中它工作正常。 请帮帮我。
<html>
<head>
<script type="text/javascript">
function Printpd(pdf)
{
pdf.focus();
pdf.print();
}
</script>
</head>
<body>
<iframe name="myFrame" id="myFrame" width="600" height="400" src="uploadedfiles/DPA%20Quick%20Reference%20Guide.pdf""></iframe>
<input type="button" value="Print IFRAME" onclick="Printpd(myFrame);" />
</body>
</html>
【问题讨论】:
-
我相信 Firefox 需要 contentWindow stackoverflow.com/questions/472951/…
-
我试过那个..但没用..