jQuery打印图片pdf、txt示例代码
2014-07-22 00:00
459 查看
html加如下代码
web界面添加按钮调用js即可
<div style="display:none"> <div id="to_print"></div> <input type="button" id="print_button" value="Print" onclick="document.getElementById('FILEtoPrint').focus(); document.getElementById('FILEtoPrint').contentWindow.print();" /> </div> <script> function printSome(path){ //传入文件路径 $("#to_print").html('<iframe src='+path+' id="FILEtoPrint"></iframe>'); setTimeout(function(){$("#print_button").click();}, 500); } </script>
web界面添加按钮调用js即可
相关文章推荐
- jQuery打印图片pdf、txt示例代码
- jQuery打印图片,pdf,txt
- 【示例代码】3D旋转图片立体展示jquery幻灯片插件(附源码)
- JQuery 图片滚动轮播示例代码
- Jquery 切换不同图片示例代码
- Jquery 切换不同图片示例代码
- jquery实现多行文字图片滚动效果示例代码
- jquery animate图片模向滑动示例代码
- JQuery 图片滚动轮播示例代码
- 利用jQuery简单实现产品展示图片左右滚动功能(示例代码)
- ZPL 打印条码、二维码及小票(中文/汉字),生成条码、二维码图片【Asp.Net】-含示例代码
- js、jquery图片动画、动态切换示例代码
- 【示例代码】基于jQuery和CSS3的图片层叠效果插件
- jquery实现鼠标拖动图片效果示例代码
- jquery实现鼠标拖动图片效果示例代码
- ZPL 打印条码、二维码及小票(中文/汉字),生成条码、二维码图片【Asp.Net】-含示例代码
- jQuery简易图片放大特效示例代码
- jQuery简易图片放大特效示例代码
- js、jquery图片动画、动态切换示例代码
- 利用jQuery简单实现产品展示图片左右滚动功能(示例代码)