更新时间:2023-08-31 21:49:46
您不能编辑浏览器内置的上下文菜单,但您可以禁用它,并使用 oncontextmenu 用自己的替换code>事件
窗口
对象。我要提醒,这往往是一个坏主意。用户希望找到内置上下文菜单,并经常感到沮丧时,它不存在。
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.