如何使用Javascript弹出打印对话框? [英] How can I pop-up a print dialog box using Javascript?

查看:675
本文介绍了如何使用Javascript弹出打印对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有打印链接的页面,可以将用户带到打印机友好页面。客户希望在用户到达打印页面时自动显示打印对话框。我怎么能用javascript做这个?

I have a page with a "Print" link that takes the user to a printer-friendly page. The client wants a print dialog box to appear automatically when the user arrives at the print-friendly page. How can I do this with javascript?

推荐答案

window.print();  

除非你的意思是自定义弹出窗口。

unless you mean a custom looking popup.

这篇关于如何使用Javascript弹出打印对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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