防止检查元件控制器(MVC)侧 [英] Prevent inspect element controller (MVC) side

查看:74
本文介绍了防止检查元件控制器(MVC)侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网站中阻止Inspect元素。



i在jquery中获得了很多解决方案,但我想在没有jquery的情况下使用控制器端。



我尝试过:



// jquery

< a href =https://stackoverflow.com/questions/24319786/how-to-hide-form-code-from-view-code-inspect-element-browser> javascript - 如何从视图代码中隐藏表单代码/检查元素浏览器? - 堆栈溢出 [ ^ ]

i want to prevent Inspect element in website.

i got many solution in jquery but i want to do with controller side without jquery.

What I have tried:

//jquery
javascript - How to hide form code from view code/inspect element browser? - Stack Overflow[^]

推荐答案

您无法控制最终用户使用基于浏览器的调试工具。您提供的链接甚至表示,您肯定无法从服务器端应用程序控制用户客户端浏览器。



您所能做的就是拦截任何右键单击命令,但这不会阻止任何人在他们的浏览器上点击f12来调出相同的调试工具。



如果你的最终目标是控制你的用户PC,我认为你需要重新思考你想做什么。
You can't control the end user from using browser based debugging tools. The link you provided even says that, and you most certainly can't control a users client side browser from a server side application.

All you can do is intercept any right click commands but that won't prevent anyone from hitting f12 on their browser to bring up the same debugging tools.

I think you need to rethink what it is you are trying to do if your end goal is to control your users PC.


这篇关于防止检查元件控制器(MVC)侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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