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);
精彩评论