<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>EasyUI 測試</title> <link rel="stylesheet" type="text/css" href="../jquery/easyui-themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="../jquery/easyui-themes/icon.css"> <script type="text/javascript" src="../jquery/jquery.js"></script> <script type="text/javascript" src="../jquery/jquery.easyui.min.js"></script> <script type="text/javascript" src="../jquery/easyui-lang-zh_TW.js"></script> </head> <body> <ul id="tree1"></ul> <script language="javascript"> $(document).ready(function(){ $("#tree1").tree({ lines:true, data:[{ "id":1, "text":"總統府", "state":"closed", "children":[{ "id":11, "text":"行政院", "state":"closed", "children":[{ "id":111, "text":"內政部" },{ "id":112, "text":"外交部" },{ "id":113, "text":"國防部" }] },{ "id":12, "text":"立法院", "state":"closed", "children":[{ "id":121, "text":"內政委員會" },{ "id":122, "text":"外交委員會" },{ "id":123, "text":"國防委員會" }] },{ "id":13, "text":"司法院", "state":"open", "children":[{ "id":131, "text":"最高法院" },{ "id":132, "text":"高等法院" },{ "id":133, "text":"地方法院" }] }] }] }); }); </script> </body> </html>