MS边缘 - window.print()在MS边缘不是帧上下文 [英] MS Edge - window.print() is not frame contextual in MS edge
本文介绍了MS边缘 - window.print()在MS边缘不是帧上下文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在大多数浏览器中调用window.print()从一个iframe中的一个页面将只打印该iframe的内容。然而在边缘它总是会打印整个文档。
这是故意的吗?是否有解决方法?
JSFiddle 的示例。
...
< ;主体>
< a href =#onclick =window.print()>打印iframe文档< / a>
< / body>
...
index.html
...
< body>
< a href =#onclick =window.print()>打印外部文件< / a>
< iframe src =iframe.html>< / iframe>
< / body>
...
解决方案
一个href =https://connect.microsoft.com/IE/Feedback/Details/1589775 =noreferrer>确认问题与微软,报价:
Microsoft发布于2015年7月29日上午12:46
我们能够确认此问题,并将在未来版本中解决该问题
还没有解决方法。
Microsoft Edge is not handling window.print() consistently when compared with other browsers.
In most browsers calling window.print() from within an iframe on a page will only print the contents of that iframe. However in edge it will always print the whole document.
Was this intentional? Is there workaround?
Example on JSFiddle.
iframe.html
...
<body>
<a href="#" onclick="window.print()">print iframe document</a>
</body>
...
index.html
...
<body>
<a href="#" onclick="window.print()">print outer document</a>
<iframe src="iframe.html"></iframe>
</body>
...
解决方案
This is a confirmed issue with microsoft, quote:
Posted by Microsoft on 7/29/2015 at 12:46 AM
We were able to confirm the issue, and will be working to resolve it in a future release
No workaround exists yet.
这篇关于MS边缘 - window.print()在MS边缘不是帧上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文