Using the following we can disable print-screens or screenshots in Internet Explorer:
<body onload=setInterval("window.clipboardData.setData('text','')",2)
oncontextmenu="return false" onselectstart="return false">
But these don't work in Mozilla, Chrome and other browsers.
Is there a better way to disable print-screens/screenshots?
What makes you think it's your decision if people should be able to take screenshots or not?
Luckily no browser but IE allows you to access the clipboard via JavaScript so you are out of luck :)
By the way, if I visited your site and it messed up my clipboard (it overwrites anything in there, even if it's unrelated to your site) - I might have stored something in it that I've just cut from some file and I was going to paste in a different file and thanks to your site it would now be lost.
So, the conclusion is: Stop doing crap like that.
If you're giving a sample of something you'll later want to sell to a customer then one thing you can do is have an image saying 'Copyrighted Material' and use it as a background on the webpage like a watermark. Disabling text selection, context menus and copying with CTRL + A is possible in both I.E. and Chrome, although I forget right now how I've done this (it was a CSS solution, and quite simple, too). Anyway, so that's one thing that can be done - if you can't protect it, spoil it so that it's unusable. Stock image sites use this method by watermarking their pictures, something that can be implemented on websites server-side with php, etc.
Try onKeyPress
catch the PrtScr button, and return false. It's not pretty but I think that would work.
window.addEventListener("keyup",kPress,false);
function kPress(e)
{
var c=e.keyCode||e.charCode;
if (c==44) alert("print screen");
}
来源:https://stackoverflow.com/questions/5938466/how-can-i-disable-print-screen-functionality-for-a-webpage-in-all-browsers