禁用右键单击,另存为,打印屏幕 [英] Disable Right Click, save as, print screen

查看:112
本文介绍了禁用右键单击,另存为,打印屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...

我必须禁用右键单击,另存为,打印屏幕,复制并粘贴到我的项目中..实际上我已经使用javascript进行了相同的操作.但是我不想使用javascript ...有什么方法可以做使用C#代码...如果我们禁用浏览器中的javascript,我认为javascript是不安全的,那么我们可以右键单击并执行所有操作...因此,我不想在javascript中使用它....

任何建议都热烈欢迎!


感谢

Hi...

I have to disable right click, save as, print screen, copy and paste in my project.. Actually i had done the same with the use of javascript.. But i dont want to use javascript... Is there any way to do with c# code... I think javascript is not secure bcoz if we disable javascript in browser then we can right click and do all things... So, i dont want to use it in javascript....

Any Suggestions warm welcome!!


Thanks

推荐答案

我经常发现,如果您需要这样做,那么对于您的应用程序,网站可能是错误的工具.无论如何,大多数精明的用户都会知道如何解决这些限制中的大多数问题,因此您首先要问自己为什么需要这样做.这是客户驱动的需求吗?如果是这样,请准确询问他们为什么要这样做.如果他们不能正确表达需求,那么他们就不会想到并想要它,而不是需要它.
I often find that if you need to do this then a web site is probably the wrong vehicle for your application. Most savvy users will know how to get around most of these restrictions anyway and you need to ask yourself why you need to do it in the first place. Is this a client driven requirement? If so, ask them exactly why they want it. If they can''t properly articulate the requirement they haven''t thought it through and want it rather than need it.


即使您做了,也不会保护您的数据.尝试一下实验:转到菜单(在Chrome中为扳手),然后选择查看源代码".
或者,从浏览器切换到任务栏.按打印屏幕".

您的Web应用程序无法停止这两个操作中的任何一个...

一旦呈现给用户,任何事情都是不安全的.记住那个.

在英国,我们过去经常让电视探测器货车四处走走,寻找有电视运营但没有电视执照的房屋.他们通过阅读屏幕上的无线电发射来工作,并且可以很好地了解您所观看的内容.较旧的(非LCD)监视器的工作方式与电视相同.
Even if you did, it would not secure your data. Try an experiment: go to the menu (in Chrome it''s the spanner) and select "View source".
Or, switch from your browser to the task bar. Press "Print Screen".

Your web app cannot stop either of these...

Nothing is secure, once it is presented to the user. Remember that.

In the UK, we used to have TV detector vans going around looking for houses where there was a TV operating, but no TV Licence. They worked by reading the radio emissions from the screen, and could get a good picture of what you were watching. Older (non-LCD) monitors work the same way as TV did...


没有其他方法可以做到这一点.您可以通过添加
来禁用右键单击,而无需使用javascript
There is no any other way to do this. You can disable the right click without the use of javascript by adding

<body oncontextmenu="return false;">

.但是,有经验的用户也可以轻松绕过该技巧.通常,禁用右键单击不是一个好习惯.

请参考 http://www.sitepoint.com/dont-disable-right-click/ [ ^ ]了解原因.....

希望这会有所帮助.
一切顺利.

. But an experienced user can easily bypass this trick as well. Generally disabling right clicking is not considered a good habit.

Refer http://www.sitepoint.com/dont-disable-right-click/[^] to know why.....

Hope this helps.
All the best.


这篇关于禁用右键单击,另存为,打印屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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