EasyUI Jquery 动态加载树,点击节点加载
<script type="text/javascript"> $(function() { $(document).ready(function() { $.post("./test/tree.action", {}, function(json) { $("#tt").tree({ data : json.itemsList, onClick : function(node) { $.post("./test/tree.action", { "id" : node.id }, function(json) { $('#tt').tree('append', { parent : node.target, data : json.data }); }, "json"); } }); }, "json"); }); }); </script> </head> <body> <ul id="tt"></ul> </body>
版权声明:本博文原创发表于博客园,作者博客:YuBinfeng's Technology Blog
| |