jQuery MiniUI 开发教程 导航控件 Menu:菜单(二)

文心思
2023-12-01
[b]菜单[/b]
[img]http://www.miniui.com/docs/api/images/menu-h.gif[/img]

参考示例:[url=http://www.miniui.com/demo/menu/menu.html]菜单[/url]

[b]创建菜单[/b]
<ul id="menu1" class="mini-menubar" style="width:100%;"
url="../data/listMenu.txt" idField="id" parentField="pid">
</ul>

[b]url数据格式[/b]
[
{ id: "1", text: "文件(F)"},
'-',
{ id: "2", text: "新建", iconCls: "icon-new", pid: "1"},
{ id: "3", text: "文件", pid: "2"},
{ id: "4", text: "文件夹", pid: "2"},
{ id: "5", text: "打开", iconCls: "icon-folderopen", pid: "1"},
{ id: "6", text: "保存", pid: "1"},
{ id: "7", text: "关闭", pid: "1"},

{ id: "8", text: "编辑(E)"},
{ id: "9", text: "剪切", iconCls: "icon-cut", pid: "8"},
{ id: "10", text: "复制", pid: "8"},
{ id: "11", text: "粘贴", pid: "8"},

{ id: "12", text: "查看(V)"},
{ id: "13", text: "帮助(H)", iconCls: "icon-help"}
]
 类似资料: