禁用浏览器菜单项 [英] Disable browser menu item

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

问题描述

你好!

推荐答案

不,那是绝对不可能的,如果某些javascript可以做到那,注入javascript杀死它是微不足道的.杀死鼠标右键的任何尝试也只会阻止最不习惯的用户,其他任何人都可以击败它.如果将其发送到浏览器,客户端将在需要时获取它.

No, that is absolutely impossible, and if some javascript COULD do that, it would be trivial to inject javascript to kill it.  Any attempt to kill the right mouse button will also only stop the most casual of users, anyone else can beat it.  If you send it to the browser, the client is going to get it if they want it.


否.无法阻止任何浏览器命令.您可以做的一件事就是禁用功能,而不只是不向用户显示这些功能.

只需使用window.open(大多数银行网站都这样做)在新窗口中打开页面,同时隐藏所有工具栏,菜单栏等,并禁用上下文菜单.

您可以查看如何禁用网站上的右键单击上下文"菜单.
http://www.codeproject.com/tips/42554/Javascript-hack-to-disable-Right-Click-and-Text-Se.aspx [
No.. Its not possible to prevent any command of browser. One thing that you can do is just to disable the features just not showing them to the user.

Just open the page in a new window using window.open (most of the banking sites does that) with all toolbar, menubar etc hidden and disable context menu.

You can take a look into this on how to disable Right - click context menu from your website.
http://www.codeproject.com/tips/42554/Javascript-hack-to-disable-Right-Click-and-Text-Se.aspx[^]


Also, most of the browser doesnt allow to hide addressbar. So dont show any sensitive information as querystring.

I hope this will partially solve your issue.... :)


这篇关于禁用浏览器菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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