【发布时间】:2017-12-12 08:14:45
【问题描述】:
var treeJSON = '';
function getTreeJSON() {
$.ajax({
type: 'POST',
url: 'controller.php',
async: false,
data: {
param: "FunctionCore->FunctionCoreImpl->getTreeJSON()"
},
dataType: 'json',
success: function (JSON) {
treeJSON = JSON;
}
});
}
tree.treeview({
levels: 1,
color: "#428bca",
data: treeJSON});
我可以从页面获取 json,但是 bootstrap-treeview 不起作用 首先,我想在 bootstrap-treeview 中使用动态 json。 其次,我不想刷新页面。 我能做什么?
【问题讨论】: