-
FEATURED COMPONENTS
First time here? Check out the FAQ!
请问一下,我打算在menupopup元素的onOpen事件中添加判断,当判断不符合要求时,我想要使用 event.stopPropagation();来终止menupopup的显示。但是,不起作用。 该如何处理呢? code:
<menupopup id="MenuLsbMain" >
<attribute name="onOpen">
if(false)
{
event.stopPropagation();
}
</attribute>
<menuitem label="查看" image="../../images/ToolBar/view.png"> </menuitem> </menupopup>
but the menupopup always show
try event.getTarget().close();
see also: http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/Popup.html#close())
Asked: 2013-09-12 09:04:52 +0800
Seen: 9 times
Last updated: Sep 23 '13