如何禁用HTML视图源或以编程方式加密Html元素? [英] How to Disable HTML view source or Encrypt Html elements programatically?

查看:232
本文介绍了如何禁用HTML视图源或以编程方式加密Html元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某些原因,我必须禁用我的html的查看源代码。
有一些第三方工具(Html Guardian)来加密html并使用它们。我有手动加密我的htmls并使用转换后的html。但我想用脚本,小程序或其他方式编程实现它。
我可以以编程方式执行吗?

For some reasons, I have to disable view source for my html. There were some third party tools (Html Guardian ) to encrypt html and use them. I have manualy encrypt my htmls and use the converted html. But i would like to achieve it programatically using scripts, applets or whatever. Can I do it programatically?

我正在使用Asp.net MVC3应用程序。
在呈现视图的同时,如何在不改变其在浏览器中的显示的情况下加密html?
是否有任何javascript可以这样做?

I am using Asp.net MVC3 application. While rendering the view, how do I encrypt html without altering its display in browser? Is there any javascript available to do so?

推荐答案

您无法在互联网世界中获得一切你看,你可以尝试禁用鼠标右键点击,使普通用户更难,你不能隐藏它从专业。

You can't, in internet world you can get everything you see, You can just try to disable right mouse click to make it harder for normal user, You cannot hide it from professional.

PS:这个网站很有趣,你可以尝试查看源代码 http://lcamt​​uf.coredump.cx/squirrel/

PS: this site is funny, you can try to view source http://lcamtuf.coredump.cx/squirrel/

这篇关于如何禁用HTML视图源或以编程方式加密Html元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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