<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>
