如何使用javascript或jquery在asp.net应用程序中禁用右键单击,f12(调试)和ctrl + s [英] how to disable right click, f12(debug) and ctrl+s in asp.net application using javascript or jquery

查看:271
本文介绍了如何使用javascript或jquery在asp.net应用程序中禁用右键单击,f12(调试)和ctrl + s的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用javascript或jquery在asp.net应用程序中禁用右键单击,f12(调试)和ctrl + s ..
必须黑色ctrl + s - >不允许保存页面
必须黑色f12并右键单击 - >不允许检查/调试/查看页面源

解决方案

不允许保存页面 - 这是不可能的,因为这不需要首先将页面交付给用户。



不允许检查/调试/查看页面源 - 这也是不可能的。在Chrome中,您可以在网址中添加 view-source:,然后您可以使用菜单 - >工具 - >开发人员工具访问开发人员工具。在任何情况下,浏览器都有可以访问源代码以实际显示页面。



你要做的是不可能的。绝对没有理由。 (对于真正想要点击右键的合法用户来说,这也非常烦人!)如果你想为安全性做这件事,这绝对不是你最大的问题。如果向客户端提供任何不安全的信息,您必须立即重新设计整个系统

how to disable right click, f12(debug) and ctrl+s in asp.net application using javascript or jquery.. Have to black ctrl+s --> Do not allow to save the page Have to black f12 and right click--> Do not allow to inspect/debug/view source of the page

解决方案

"Do not allow to save the page" - This is impossible, as this would require not delivering the page to the user in the first place.

"Do not allow to inspect/debug/view source of the page" - This is also impossible. In Chrome you can prepend view-source: to the URL, and you can get to developer tools with Menu -> Tools -> Developer Tools. In any case, the browser has to have access to the source code to actually display the page.

What you are trying to do is impossible. There is also absolutely no reason to. (It's also highly annoying to legitimate users who actually want to right click!) If you're trying to do this for "security," this is most definitely not your biggest problem. If there's any insecure information delivered to client side, you have to redesign your entire system immediately.

这篇关于如何使用javascript或jquery在asp.net应用程序中禁用右键单击,f12(调试)和ctrl + s的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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