你配置有问题吧。。$("#dvtree").jstree({
"core": {
"data": {
"url": "ajax/Handler1.ashx",
"data": function (n) {
return { id: n.attr ? n.attr("id") : 0 };
}
}
},
"plugins": ["themes", "json_data"]
});
而且数据中显示的文本节点时text,不是data strJson = "[{\"text\":\"aaa\",\"attr\":{\"id\":\"1\"},\"state\":\"open\",\"children\":[{\"text\":\"bbb\",\"attr\":{\"id\":\"2\"},\"state\":\"closed\"}]}]";
"core": {
"data": {
"url": "ajax/Handler1.ashx",
"data": function (n) {
return { id: n.attr ? n.attr("id") : 0 };
}
}
},
"plugins": ["themes", "json_data"]
});
而且数据中显示的文本节点时text,不是data strJson = "[{\"text\":\"aaa\",\"attr\":{\"id\":\"1\"},\"state\":\"open\",\"children\":[{\"text\":\"bbb\",\"attr\":{\"id\":\"2\"},\"state\":\"closed\"}]}]";
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货