jQuery MiniUI 開發教程 樹形控件 創建樹:樹形結構(一)

                             
參考示例:Tree 樹形控件

                     
創建Tree          

<ul id="tree1" class="mini-tree" url="../data/tree.txt" style="width:300px;padding:5px;"
    showTreeIcon="true" textField="text" idField="id" >       
</ul>
      
           
數據結構:樹形         

通過url返回的數據結構如下:

[
    {id: "base", text: "Base", expanded: false,
        children: [
            {id: "ajax", text: "Ajax"},
            {id: "json", text: "JSON"},
            {id: "date", text: "Date"},
            {id: "control", text: "Control"},
            {id: "messagebox", text: "MessageBox"},
            {id: "window", text: "Window"}
        ]
    },
    …
]

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *