菜单定义在一些DIV元素中,就像下面:
<div id="mm" class="easyui-menu" style="width:120px;">
<div οnclick="javascript:alert('new')">New</div>
<div>
<span>Open</span>
<div style="width:150px;">
<div><b>Word</b></div>
<div>Excel</div>
<div>PowerPoint</div>
</div>
</div>
<div icon="icon-save">Save</div>
<div class="menu-sep"></div>
<div>Exit</div>
</div>
当菜单创建之后是不显示的,调用'
show'方法显示它或者调用
'hide'方法隐藏它.
- $('#mm').menu('show', {
- left: 200,
- top: 100
- });