如何在某些页面的浏览器中禁用打印选项 [英] How to disable printing options in the browser for certain pages
本文介绍了如何在某些页面的浏览器中禁用打印选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
您无法禁用实际的对齐/菜单项,但您可以在所需页面中使用以下内容来防止打印:
< style type =text / cssmedia =print>
BODY {display:none; visibility:hidden;}
< / style>
Env: jQuery,richfaces,all major browsers
How to disable printing options in the browser for certain pages (e.g. File-->Print Preview, Print)
解决方案
You cannot disable the actual buttions/menu items but you can use following in required pages to prevent printing:
<style type="text/css" media="print">
BODY {display:none;visibility:hidden;}
</style>
这篇关于如何在某些页面的浏览器中禁用打印选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文