开发者

Selecting item in context menu for Firefox

I am trying to check which option the user selects in the default context menu for browser (Firefox3+) using Javascrip开发者_Go百科t. When I tried searching about it, they say the only option is to create my own context menu having options of my choice. Please let me know if there is any direct method associated which will return the option selected in context menu.


You can watch the context menu for command events, but this only works for menuitems that use the oncommand attribute; menuitems that use the command attribute never see their own command event.

document.getElementById("contentAreaContextMenu").addEventListener("command", myListener, true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜