如何在jquery / javascript中跳过浏览器默认打印预览​​并将内容直接打印到打印机? [英] How to skip browser default print preview and print content directly to printer in jquery/javascript?

查看:1083
本文介绍了如何在jquery / javascript中跳过浏览器默认打印预览​​并将内容直接打印到打印机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我们知道在C#windows表单应用程序中我们可以打印内容直接打印而无需任何预览。我想在用户点击按钮时在jquery / javascript中打印内容,浏览器没有显示任何打印预览和打印到打印机的内容

As, we know in C# windows form application we can print content direclty to print without any preview. I want to print content in jquery/javascript when user click a button, browser does not show any print preview and content printed to printer

推荐答案

<浏览器不会允许这种情况发生。您可以使用以下插件提供精美的预览。

Browsers will not allow that to happen. You can use the below plugin to provide beautiful previews.

https://github.com/etimbo/jquery-print-preview-plugin

演示: http://etimbo.github.io/jquery-print-preview-plugin/example/index。 html

这篇关于如何在jquery / javascript中跳过浏览器默认打印预览​​并将内容直接打印到打印机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆