ajax 的success回调函数里function(data)
data的格式为[{id: "1", text: "模块1"},{id: "11", text: "模块1-1",pid: "1",checked: "false"},{id: "111", text: "模块1-1-1",pid: "11",checked: "false"},{id: "112", text: "模块1-1-2",pid: "11",checked: "false"},{id: "12", text: "模块1-2",pid: "1",checked: "false"},{id: "2", text: "模块2"},{id: "21", text: "模块2-1",pid: "2",checked: "false"},{id: "3", text: "模块3"},{id: "31", text: "模块3-1",pid: "3",checked: "false"},[{id: "1", text: "模块1"},{id: "11", text: "模块1-1",pid: "1",checked: "false"},{id: "111", text: "模块1-1-1",pid: "11",checked: "false"}]
如何把这些数据赋值到树上?
|