Disabling Print Screen Command

一曲冷凌霜 提交于 2019-12-12 06:29:50

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/23485438/disabling-print-screen-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!