【问题标题】:remove message select printer and automatically print the document with javascript删除消息选择打印机并使用 javascript 自动打印文档
【发布时间】:2013-08-28 22:34:26
【问题描述】:

我正在打印文档,并找到了使用 javascript 的替代方法。

代码是:

 <html>
<head>
<script type="text/javascript">
function printpage()
{
   window.print();
   window.close();
}
</script>
</head>
<body onload="printpage()">
<embed src="pdfhere.pdf"/>
</body>
</html>

如果我创建一个 html 页面并使用 Internet Explorer 打开它,我会发送一条消息以选择打印机并打印文档。 我想要做的是自动打印文档而不显示该消息 感谢您的帮助。

【问题讨论】:

标签: javascript html printing


【解决方案1】:

您不能跳过浏览器打印对话框。这是由您的浏览器/操作系统提供的。

window.print() 是你能做的最好的。

【讨论】:

  • 我无法删除邮件?
  • 不,您不能跳过打印对话框。
猜你喜欢
  • 2013-11-08
  • 1970-01-01
  • 2016-10-09
  • 1970-01-01
  • 2021-04-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多