浏览器上下文菜单自定义? [英] Browser Context Menu customization?

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

问题描述

有没有办法覆盖撤销和选择所有在浏览器上的textarea的右键快捷菜单?

Is there a way to override the "undo" and "select all" in right click context menu of the browser over textarea?

感谢您。

推荐答案

您不能编辑浏览器内置的上下文菜单,但您可以禁用它,并使用 oncontextmenu 事件窗口对象。我要提醒,这往往是一个坏主意。用户希望找到内置上下文菜单,并经常感到沮丧时,它不存在。

You cannot edit the browser's built-in context menu, but you can disable it and replace it with your own using the oncontextmenu event on the window object. I would caution that this is often a bad idea. Users expect to find the built-in context menu and are often frustrated when it isn't there.

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

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