有没有什么方法可以通过单击一个按钮直接打印内容,而无需预览或打印对话框?我的代码
<head>
<style type="text/css">
#printable { display: none; }
@media print
{
#non-printable { display: none; }
#printable { display: block; }
}
</style>
</head>
<body>
<div id="non-printable">
MY normal page contents
</div>
<div id="printable">
Printer version
</div>
</body>
最佳答案
不,你不能“安静地”打印
关于javascript - 不带预览/对话框直接打印,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13667417/