zzc666

下载地址  http://doersguild.github.io/jQuery.print/

github地址 https://github.com/DoersGuild/jQuery.print

使用时直接引入js文件

<script type="text/JavaScript" src="path/to/jquery.print.js"></script>

<div id="ele">
       <h1>印刷</h1>
</div>
//使用时div的样式不可设置为隐藏,可先隐藏,执行打印方法时利用js切换显示效果,打印结束再隐藏
$("#ele").print(/*options*/);
或者使用下面的代码
$("#ele").print({
        globalStyles: true,
        mediaPrint: false,
        stylesheet: null,
        noPrintSelector: ".no-print",
        iframe: true,
        append: null,
        prepend: null,
        manuallyCopyFormValues: true,
        deferred: $.Deferred(),
        timeout: 750,
        title: null,
        doctype: \'<!doctype html>\'
 });

  

 

 

分类:

技术点:

相关文章:

  • 2021-10-09
  • 2021-07-23
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-18
  • 2021-08-30
  • 2021-11-05
  • 2021-04-05
  • 2022-12-23
  • 2021-12-12
  • 2021-11-18
相关资源
相似解决方案