当前位置:编程学习 > JS >>

jQuery MiniUI 开发教程 树形控件 创建树:本地JSON(三)

参考示例:创建树:本地JSON


          
创建Tree         

没有设置url。

<ul id="tree3" class="mini-tree" style="width:300px;padding:5px;"
    showTreeIcon="true" textField="text" idField="id" >       
</ul>
         
                   
Javascript设置数据

var tree3 = mini.get("tree3");
tree3.loadData([
    { id: "lists", text: "Lists", expanded: false,
        children: [
            { id: "datagrid", text: "DataGrid" },
            { id: "tree", text: "Tree" },
            { id: "treegrid", text: "TreeGrid " }
        ]
            },
    { id: "layouts", text: "Layouts", expanded: false,
        children: [
            { id: "panel", text: "Panel" },
            { id: "splitter", text: "Splitter" },
            { id: "layout", text: "Layout " }
        ]
    },  www.zzzyk.com
    { id: "navigations", text: "Navigations", expanded: false,
        children: [
            { id: "pager", text: "Pager" },
            { id: "tabs", text: "Tabs" },
            { id: "navbar", text: "NavBar" },
            { id: "menu", text: "Menu" }
        ]
    }
]);

补充:web前端 , JavaScript ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,