前端实现调动打印机部分打印界面


下载地址  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>'
 });

  

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM