jQuery EasyUI 1.3.1 官方下载地址:
$(function () {
$(document).ready(function () {
$.post("/ORG/ajax/getRoles.aspx", {}, function (json) {
$("#tt77").tree({
data: json,
onClick: function (node) {
//----
$('#hid').val(node.id);
$('#wbs').val(node.attributes);
var b = $('#tt77').tree('isLeaf', node.target);
if (!b) {
return;
}
//------
$.post("/ORG/ajax/getRoles.aspx?id=" + node.id, {
"id": node.id
}, function (json) {
$('#tt77').tree('append', {
parent: node.target,
data: json
});
}, "json");
},
checkbox: true,cascadeCheck:false
});
}, "json");
});
});
内容: