用JavaScript自定义上下文菜单? [英] Custom Context Menu with Javascript?

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

问题描述



我知道flash / actionscript可以做到这一点,他们是如何做到这一点?例如:右键点击 http://josephjewell.com 并查看自定义上下文菜单。



这是可能的纯JavaScript还是你必须使用闪光?



请注意,我正在寻找添加到内置的浏览器上下文菜单,而不是使用自定义JavaScript弹出窗口来模仿它们。

解决方案



不。


使用Flash?


好的,您可以使用Flash,但是您并未添加到浏览器菜单,你用Flash的完全取代它。所以这并没有让你太多,脚本ersatz菜单不(真的只有你得到适当的操作系统主题菜单默认情况下)。

在任何甚至JS ersatz菜单也不可靠,因为并不是所有的浏览器都会让你删除浏览器的默认菜单。最好不要依赖脚本右键单击菜单。


Is there a way to add custom fields to the built in browser context menu using Javascript?

I know flash/actionscript can do this, how are they doing it? Example: right click on http://josephjewell.com and see the custom context menu.

Is this possible with pure javascript or do you have to use flash?

Note, I'm looking for adding to the built in browser context menu, not using custom javascript popups to mimic them.

解决方案

Is this possible with pure javascript

No.

do you have to use flash?

Well, you can use Flash, but then you're not adding to the browser menu, you're replacing it completely with Flash's one. So this doesn't get you much that the scripted ersatz-menu doesn't (really only that you get the proper OS theme for menus by default).

In any case even JS ersatz-menus are not reliable, as not all browsers will always let you remove the browser default menu. It is best not to rely on scripting right-click menus.

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

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