【问题标题】:Print html contents directly using jquery直接使用jquery打印html内容
【发布时间】:2012-06-11 18:03:12
【问题描述】:

来自 jquery 的代码片段

$.post("GetData",{

     itemCode:getItemCode

    }, function(html) {

         //want to Print to a printer directly html contents using jquery 

    }); 

我想直接将servlet响应打印到打印机,它是html类型的。

我们怎样才能做到这一点?是否有任何 jquery 插件可用于执行此操作?或者有一些技巧可以做到这一点?

【问题讨论】:

  • 打印到屏幕,或打印机..?
  • 您是在谈论记录 HTML 响应还是将 HTML 插入 DOM?
  • 此页面上有一个 jQuery 插件,您可以使用它来打印该内容。 bennadel.com/blog/…

标签: jquery ajax printing


【解决方案1】:

有一个不错的 jQuery 插件可以做到这一点:jqPrint

【讨论】:

    猜你喜欢
    • 2018-07-08
    • 1970-01-01
    • 2016-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多