gpt4 book ai didi

javascript - jQuery Print - 打印前显示预览

转载 作者:行者123 更新时间:2023-11-30 06:35:36 26 4
gpt4 key购买 nike

我想打印页面的一部分,即一个 div。此外,我需要引用 css 文件,因此它会像我们在页面中看到的那样被打印出来。

I tried to use jQPrint then printThis . But my IE7 browser was getting crashed when i click a button on second time. Not sure what is the problem. My page has lot of elements (100+ input fields and 3 Grids)

最后,我关注了这个http://www.bennadel.com/blog/1591-Ask-Ben-Print-Part-Of-A-Web-Page-With-jQuery.htm并实现。现在没有崩溃!

现在如何在发送打印机之前显示打印预览对话框?

像这样的东西 https://github.com/etimbo/jquery-print-preview-plugin ,我也试过了,但没用 :(

最佳答案

我在之前的工作中完成了同样的任务,并完成了以下示例。我们将其设置为我们发送到打印机的设计的任何部分,我们将复制 HTML,并使用该内容创建一个动态页面,然后触发浏览器打印对话框。如果您想按照您的要求进行操作,而不需要太多“魔法”,这是处理它的好方法。

关于javascript - jQuery Print - 打印前显示预览,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14748721/

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