如何在所有浏览器中禁用网页的打印屏幕 [英] How can i disable print screen for a web page in all browser

查看:629
本文介绍了如何在所有浏览器中禁用网页的打印屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下我们可以在IE中禁用

Using the following we can disable in IE

   <body onload=setInterval("window.clipboardData.setData('text','')",2) 

    oncontextmenu="return false" onselectstart="return false">

但这些在Mozilla,Chrome及其他产品中无效

But these doesnt work in Mozilla, Chrome and others

有些人可以提出更好的主意吗

can some body suggest a better idea

推荐答案

是什么让你认为如果人们应该能够接受你的决定是不是截图?

What makes you think it's your decision if people should be able to take screenshots or not?

幸运的是没有浏览器,但是IE允许你通过JavaScript访问剪贴板,所以你运气不好:)

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.

所以,结论是:停止做垃圾那样。

这篇关于如何在所有浏览器中禁用网页的打印屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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