禁用浏览器菜单项

编程入门 行业动态 更新时间:2024-10-10 04:25:57
本文介绍了禁用浏览器菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好!

推荐答案

不,那是绝对不可能的,如果某些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(大多数银行网站都这样做)在新窗口中打开页面,同时隐藏所有工具栏,菜单栏等,并禁用上下文菜单. 您可以查看如何禁用网站上的右键单击上下文"菜单. www.codeproject/tips/42554/Javascript-hack-to-disable-Right-Click-and-Text-Se.aspx [ ^ ] 另外,大多数浏览器不允许隐藏地址栏.因此,请勿将任何敏感信息显示为querystring. 我希望这可以部分解决您的问题....:) 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. www.codeproject/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.... :)

更多推荐

禁用浏览器菜单项

本文发布于:2023-11-28 10:35:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642049.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:菜单项   浏览器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!