gpt4 book ai didi

javascript - 无法在 chrome 中完整打印包含 iframe 的页面

转载 作者:行者123 更新时间:2023-11-28 03:35:34 25 4
gpt4 key购买 nike

我有一个网页,其中有 4 个 iframe 以及其他一些东西。当我尝试使用 window.print() 在 chrome 中打印整个页面时,它会打印除 iframe 之外的所有内容。有没有办法让它打印整个页面,包括 iframe。如果有帮助,我可以控制 iframe 中托管的页面。

最佳答案

尝试: Javascript Print iframe contents only

window.frames["iframeID"].focus();
window.frames["iframeID"].print();

关于javascript - 无法在 chrome 中完整打印包含 iframe 的页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14611172/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com