禁用页面右键单击查看源 [英] Disable page Right click View Source

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

问题描述

帮助我如何禁用页面右键单击查看源代码"选项.

Help me how to Disable page Right click View Source option.

推荐答案

这真的不值得尝试.

右键单击不是访问源的唯一方法-您可以从菜单中选择它,因此,除非您也可以禁用它,否则您什么也不做,只能惹恼用户,因为全选"和复制"和粘贴"也可以通过右键单击来进行.

您不能保护您的网站不被复制.如果我想复制它,甚至不需要使用浏览器,因此禁用右键单击甚至不会使我减速!算了-将重要的内容移到服务器上单独的源文件(C#或VB)中,因为这些文件永远不会离开它.但是保护您的HTML吗?毫无意义.
It isn''t really worth trying.

Right click is not the only way to access the source - you can select it from the menu, so unless you can disable that as well, you do nothing except annoy the heck out of the user, because "Select All" and "Copy" and "Paste" work from the right click as well.

You cannot protect your web site from copying. If I wanted to copy it, I do not even need to use a browser, so disabling right click would not even slow me down! Forget it - move the important stuff into separate source files (C# or VB) on the server, because these never leave it. But protecting your HTML? Pointless.


这篇关于禁用页面右键单击查看源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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