Internet Explorer 上下文菜单上下文位

发布于 2024-08-04 23:45:27 字数 123 浏览 1 评论 0原文

我正在尝试向上下文菜单添加两个新条目,一个用于图像,一个用于锚点。我使用 0x2 作为图像,使用 0x20 作为锚点,它们会正确显示,但是当存在带有链接的图像时,仅显示图像链接,它们会执行不同的操作,所以我希望这两个项目都显示出来?

I am trying to add two new entries to the context menu, one for images and one for anchors. I am using 0x2 for images 0x20 for anchors they are displayed correctly but when there is an image with a link only the image link is showed they do different things so i would like both items to show up?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

末が日狂欢 2024-08-11 23:45:27

@Remy - 这是一个 Windows 注册表设置,用于扩展 IE 中的上下文菜单。

HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\MenuExt\\

@Hamza
您需要将 0x20 更改为 0x22(0x2 和 0x20 之和),然后检查脚本中的“external.menuArguments.event.srcElement”属性。如果它是图像,则使用它的 src 属性(如果它是锚点扫描它的任何图像元素的子节点)。

您也可以只使用 0x1 或 0x3F 分别代表“默认”和“全部”。以下是所有可用值 -

1 = 默认值,
2 = 图像,
4 = 控制,
8 = 表格,
16 = 文本选择,
32 = 锚,
63 = 全部

(8,表格根本不起作用)

@Remy - this is a windows registry setting used to extend the Context Menu in IE.

HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\MenuExt\\

@Hamza
You'll need to change the 0x20 to 0x22 (the sum of 0x2 and 0x20) and then inspect the "external.menuArguments.event.srcElement" property in the script. If it's an image, then use it's src property if it's an anchor scan it's child nodes for any image elements.

You could also just use 0x1 or 0x3F which represet "Default" and "All" respectively. Here are all of the values available -

1 = Default,
2 = Images,
4 = Controls,
8 = Tables,
16 = Text selection,
32 = Anchor,
63 = All

(8,Tables doesn't work at all AFAIK)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文