在iframe中打印PDF会在Firefox和IE中引发错误(在chrome中工作正常)
需要帮助 我在iFrame中打开了一个PDF,在打印PDF时,它在Firefox和IE中抛出了以下错误,同样的代码在chrome中运行良好在iframe中打印PDF会在Firefox和IE中引发错误(在chrome中工作正常),iframe,Iframe,需要帮助 我在iFrame中打开了一个PDF,在打印PDF时,它在Firefox和IE中抛出了以下错误,同样的代码在chrome中运行良好 Error: Permission denied to access property 'print' window.frames["printf"].print(); // printf is my iFrame name. 下面是我用于打印的代码 //print pdf file $("#btnPrint").click(function
Error: Permission denied to access property 'print'
window.frames["printf"].print(); // printf is my iFrame name.
下面是我用于打印的代码
//print pdf file
$("#btnPrint").click(function () {
window.frames["printf"].focus();
window.frames["printf"].print();
});
如何解决这个问题
谢谢。可能是跨域的吗?不,它与跨域无关。