用户无法复制和下载文件. [英] user cannot copy and download the files.
本文介绍了用户无法复制和下载文件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
请帮助我........
如何避免用户无法从应用程序复制和下载文件.他只会读.
我在应用程序中以pdf和html文件格式提供了一些信息,但我希望用户无法复制和下载文件.
在此先感谢....
Hi all...,
Please help me........
how to avoid to user the files cannot copy and download from application. he can just read.
i am providing some informations in pdf and html files format in my application but i want to user not able to copy and download the files.
Thanks in advance....
推荐答案
(document).ready(function (){ document.oncontextmenu = function(){返回 false ;}; });
(document).ready(function(){ document.oncontextmenu = function() {return false;}; });
记住要包含jquery库
remember include jquery library
如果查看器是任何计算机技术,都无法停止复制
但对于普通用户,您可以在html页面的body标签上添加属性
即
no way to stop copy if viewer is any computer technical
but for normal user you can add attribute on body tag of your html page
i.e.
<body oncontextmenu="return false;" onselectstart="return false;" onkeydown="return false;">
</body>
还有更多可行的方法
and many more if it works
这篇关于用户无法复制和下载文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文