使用Javascript无需打开html中的打印机确认对话框即可打印到默认打印机 [英] Print to default printer without open the printer confirmation dialog box in html using Javascript

查看:280
本文介绍了使用Javascript无需打开html中的打印机确认对话框即可打印到默认打印机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在html文件中,单击该按钮可在不打开打印机确认弹出对话框的情况下单击该按钮来打印特定的div.

In html file print the particular div on clicking the button without open the printer confirmation popup dialog box automatically print that content.

推荐答案

实际上,这并不是所有 modern 浏览器都支持的方式.并且有充分的理由.

This it not practically possible in a way that's supported by all modern browsers. And for good reason.

您不希望随机网站在没有您干预的情况下开始打印内容.

You don't want random websites to start printing stuff without your intervention.

这篇关于使用Javascript无需打开html中的打印机确认对话框即可打印到默认打印机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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