$(document).ready(function () {
$.get("/api/menu/5",function (data) {
alert(data);
//zTreeObj = $.fn.zTree.init($("#menuTree"), setting, data);
})
//zTreeObj = $.fn.zTree.init($("#menuTree"), setting, zNodes); //ztree加载
// var nodes = zTreeObj.getNodes()[0].children;
});
data是controlloer返回来的数据
下面是controller的代码
public string Get(int id)
{
return "value"+id;
}