1

为了简单起见,我想修改现有的插件。我有这个代码:

<popup id="contentAreaContextMenu">
<menu id="llOpenLocalLink" label="&llOpenLocalLink.label;" insertbefore="context-sep-open" >

 <menupopup>
  <menuitem id="llOpenInThisTab" label="&llOpenInThisTab.label;" oncommand="LocalLink.openLinkInThisTab(event)"/>
  <menuitem id="llOpenInNewTab" label="&llOpenInNewTab.label;" oncommand="LocalLink.openLinkInNewTab(event)"/>
  <menuitem id="llOpenInNewWindow" label="&llOpenInNewWindow.label;" oncommand="LocalLink.openLinkInNewWindow(event)"/>
 </menupopup>

</menu>
</popup>

而且我只想要一个菜单​​条目,如果单击它就会执行。我试过了,但没有执行:

<popup id="contentAreaContextMenu">
<menu id="llOpenLocalLink" label="&llOpenLocalLink.label;" insertbefore="context-  sep-open" oncommand="LocalLink.openLinkInNewTab(event)">
</menu>
</popup>

好的。我找到了答案:

<popup id="contentAreaContextMenu">
  <menuitem id="llOpenLocalLink" label="&llOpenLocalLink.label;" insertbefore="context-sep-open" oncommand="LocalLink.openLinkInNewTab(event)"/>
</popup>
4

0 回答 0