首页 > 代码库 > 如何递归将Json树, 显示在HTML上

如何递归将Json树, 显示在HTML上

{
id: "1",
ProjectId: "4069",
TaskId: "8",
TaskName: "你好",
T_BeginDate: "",
T_EndDate: "",
T_Duration: "0.00",
T_Percent: "0",
T_ParentId: "7",
LinkProjectId: "0",
PreTasks: "",
Documents: "0",
Discussion: "0",
Reminder: "0",
T_Memo: "",
RealSource: "0",
TaskAuthority: "0",
ET_Flag: "0",
ColorLight: "",
T_AssumedMan: "",
Def: "Parent",
RealFlow: "",
RealDuration: "0",
Order: "1",
Items: [
{
id: "2",
ProjectId: "4069",
TaskId: "11",
TaskName: "不好",
T_BeginDate: "",
T_EndDate: "",
T_Duration: "0.00",
T_Percent: "0",
T_ParentId: "8",
LinkProjectId: "0",
PreTasks: "",
Documents: "0",
Discussion: "0",
Reminder: "0",
T_Memo: "",
RealSource: "0",
TaskAuthority: "0",
ET_Flag: "0",
ColorLight: "",
T_AssumedMan: "",
Def: "Parent",
RealFlow: "",
RealDuration: "0",
Order: "2",
Items: [
{
id: "3",
ProjectId: "4069",
TaskId: "13",
TaskName: "为什么不好",
T_BeginDate: "",
T_EndDate: "",
T_Duration: "0.00",
T_Percent: "0",
T_ParentId: "11",
LinkProjectId: "0",
PreTasks: "",
Documents: "0",
Discussion: "0",
Reminder: "0",
T_Memo: "",
RealSource: "0",
TaskAuthority: "0",
ET_Flag: "0",
ColorLight: "",
T_AssumedMan: "",
Def: "R",
RealFlow: "",
RealDuration: "0",
Order: "3",
Items: [

]
}
]
},
{
id: "4",
ProjectId: "4069",
TaskId: "12",
TaskName: "螺丝",
T_BeginDate: "",
T_EndDate: "",
T_Duration: "0.00",
T_Percent: "0",
T_ParentId: "8",
LinkProjectId: "0",
PreTasks: "",
Documents: "0",
Discussion: "0",
Reminder: "0",
T_Memo: "",
RealSource: "0",
TaskAuthority: "0",
ET_Flag: "0",
ColorLight: "",
T_AssumedMan: "",
Def: "R",
RealFlow: "",
RealDuration: "0",
Order: "4",
Items: [

]
}
]
},
{
id: "5",
ProjectId: "4069",
TaskId: "9",
TaskName: "真的好吗",
T_BeginDate: "",
T_EndDate: "",
T_Duration: "0.00",
T_Percent: "0",
T_ParentId: "7",
LinkProjectId: "0",
PreTasks: "",
Documents: "0",
Discussion: "0",
Reminder: "0",
T_Memo: "",
RealSource: "0",
TaskAuthority: "0",
ET_Flag: "0",
ColorLight: "",
T_AssumedMan: "",
Def: "Parent",
RealFlow: "",
RealDuration: "0",
Order: "5",
Items: [
{
id: "6",
ProjectId: "4069",
TaskId: "14",
TaskName: "真的很好",
T_BeginDate: "",
T_EndDate: "",
T_Duration: "0.00",
T_Percent: "0",
T_ParentId: "9",
LinkProjectId: "0",
PreTasks: "",
Documents: "0",
Discussion: "0",
Reminder: "0",
T_Memo: "",
RealSource: "0",
TaskAuthority: "0",
ET_Flag: "0",
ColorLight: "",
T_AssumedMan: "",
Def: "R",
RealFlow: "",
RealDuration: "0",
Order: "6",
Items: [

]
}
]
},
{
id: "7",
ProjectId: "4069",
TaskId: "10",
TaskName: "what do you meaning",
T_BeginDate: "",
T_EndDate: "",
T_Duration: "0.00",
T_Percent: "0",
T_ParentId: "7",
LinkProjectId: "0",
PreTasks: "",
Documents: "0",
Discussion: "0",
Reminder: "0",
T_Memo: "",
RealSource: "0",
TaskAuthority: "0",
ET_Flag: "0",
ColorLight: "",
T_AssumedMan: "",
Def: "R",
RealFlow: "",
RealDuration: "0",
Order: "7",
Items: [

]
}

如何递归将Json树, 显示在HTML上