简体   繁体   English

上下文菜单 - javascript

[英]context menu - javascript

I am looking to add, via javascript an item to the right click context menu on a website, how do I do that? 我希望通过javascript将一个项目添加到网站上的右键单击上下文菜单中,我该怎么做?

I have been looking around the web but have found nothing, so if you have a link to a good article that would be great. 我一直在寻找网络但没有找到任何东西,所以如果你有一个好文章的链接,那将是伟大的。

I also know there is some compatibility issues with Opera but I am not worried about that right now. 我也知道Opera存在一些兼容性问题,但我现在并不担心。

Thanks, R. 谢谢,R。

Of course I post and instantly find a good tutorial: 当然我发布并立即找到一个很好的教程:

http://luke.breuer.com/tutorial/javascript-context-menu-tutorial.htm http://luke.breuer.com/tutorial/javascript-context-menu-tutorial.htm

jQuery has Context Menu implementation. jQuery有Context Menu实现。
Here is a live demo. 是一个现场演示。

Yahoo!'s YUI library has a nice menu component, which has a ContextMenu . Yahoo!的YUI库有一个很好的菜单组件,它有一个ContextMenu You'll have the same problem you noted with Opera, but across the browsers it works nicely and it's easy to integrate your functions and style the menu. 你会遇到与Opera相同的问题,但是在浏览器中它可以很好地工作,并且很容易集成你的功能和样式菜单。

您还可以使用另一个jQuery插件, Audero Context Menu

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM