禁用打印屏幕命令 [英] Disabling Print Screen Command

查看:77
本文介绍了禁用打印屏幕命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是,当用户点击键盘上的打印屏幕"按钮时,禁用打印屏幕"命令.我可以在Internet Explorer中执行此操作,但是如何在Chrome和其他浏览器中执行此操作?

My requirement is to disable the print screen command when the user taps the print screen button on the keyboard. I can do this in Internet Explorer, but how can I do this in Chrome and other browsers?

推荐答案

无论您想做什么,我都会打赌它不会起作用.

Whatever you're trying to do, I'd wager it won't work.

您可以添加各种客户端控件来防止用户复制内容,但事实是,要首先查看您的内容,用户必须将其从服务器下载并下载到他们的计算机上,它不再由您控制.

You can add in all sorts of client-side controls to prevent users from copying content, but the fact remains that in order to view your content in the first place, users have to download it off of your servers and onto their machine, where it is no longer under your control.

充其量,您可能会让用户感到沮丧,直到他们对复制您的内容失去兴趣为止.最糟糕的是,您的努力可能会损害您网站的可用性,尤其是对于那些有残障/可访问性问题的用户.但是,如果有人真的想复制您的内容(例如,出于经济动机窃取内容),则无法阻止他们.复制网页内容的方法太多,例如其他不使用打印屏幕按钮,第三方屏幕抓取工具或仅使用开发工具读取页面源的关键命令.

At best, you may frustrate a user until they lose interest in copying your content. At worst, your efforts may harm the usability of your site, especially for users with handicaps/accessibility issues. But if someone really wants to copy your content (e.g. they are financially motivated to steal it), you cannot stop them. There are too many ways to copy content from a webpage, such as other key commands that don't use the print-screen button, 3rd party screen-grab tools, or simply reading the page source with dev-tools.

这篇关于禁用打印屏幕命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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