-->

Disabling Print Screen Command

2019-08-30 01:54发布

问题:

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.