我很难弄清楚票队列的自动打印,因为在我生成的代码中,它只出现一个新窗口和一个打印对话框,我在这里使用 MS Edge 浏览器。我想在那个对话框出现后自动打印它,就像你按下并输入打印它一样。请帮忙,这是我的 Javascript 谢谢
<script>
function printLayout() {
var _el = $('<div>')
var _h = $('head').clone()
var _p = $('#outprint').clone()
_h.find('title').text("Queue Number - Print")
_el.append(_h)
_el.append(_p)
var nw = window.open('', '_blank', 'width=700,height=500,top=75,left=200')
nw.document.write(_el.html())
nw.document.close()
setTimeout(() => {
nw.print()
setTimeout(() => {
nw.close()
$('#uni_modal').modal('hide')
window.location.href = '/queuing/kiosk/'
}, 200);
}, 500);
}
$(function() {
printLayout();
})
大声笑,我已经想通了。我用的是谷歌Chrome浏览器,我创建了一个快捷方式文件并修改了TARGET中的属性:
"C:\Program Files\Google\Chrome\Applicatio