使用java脚本在asp.net中打印页面 [英] Print page in asp.net using java script

查看:73
本文介绍了使用java脚本在asp.net中打印页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何通过单击aspx页面中的打印按钮直接打印数据,而无需再按预览中的打印按钮区域.............. ........



谢谢



我尝试过:



您好,

如何通过单击aspx页面中的打印按钮直接打印数据,而无需再次按预览中的打印按钮区域箱区.....................!



谢谢

解决方案

没有一种简单的方法可以在所有浏览器上运行 - 这是一种安全措施,以便恶意网站可以在用户不知情和批准的情况下打印垃圾。

这是可能的 - 只是 - 但它会花费更多的工作而不是合理的:

如何跳过浏览器默认打印prev iew并在jquery / javascript中将内容直接打印到打印机? - 堆栈溢出 [ ^ ]



打印 - 直接从浏览器打印而不打印弹出窗口 - Stack Overflow [ ^ ]

可能有帮助 - 但是不要指望这些解决方案在未来继续发挥作用! :笑:

Hi,
How can i print data directly by clicking Print Button in aspx page without again pressing Print button in Preview dailog box Area.....................!

Thank You

What I have tried:

Hi,
How can i print data directly by clicking Print Button in aspx page without again pressing Print button in Preview dailog box Area.....................!

Thank You

解决方案

There is no simple way to do this that works on all browsers - it's a security measure so that malicious sites can just print their rubbish without the user knowing and approving it.
It's possible - just - but it will take a lot more work than it justifies:
How to skip browser default print preview and print content directly to printer in jquery/javascript? - Stack Overflow[^]
And
printing - Print directly from browser without print popup window - Stack Overflow[^]
May help - but don't expect these solutions to remain working in the future! :laugh:


这篇关于使用java脚本在asp.net中打印页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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