概述:
一般情况下都是通过ajax进行请求获取数据。boostrap+ajax
1、代码
});
callback.call(this,jsonarray);
}
},"types" : {
"default" : {
"icon" : "glyphicon glyphicon-flash"
},"file" : {
"icon" : "glyphicon glyphicon-ok"
}
},"state" : { "key" : "demo2" },"plugins" : [ "dnd","state","types","checkbox","wholerow" ]
});
$('#setAuthority').modal();
});
总结:
"responsive": false :表示主题是否适应手机类小尺寸屏幕,默认为false "check_callback" : true:表示形成树是否可以重新组织,也是改变顺序,层次关系 callback.call(this,jsonarray):将数组放入树形 types:{}设置类型,图标 "state" : { "key" : "demo2" }:将选中的状态保存浏览器中 "plugins" : [ "dnd","wholerow" ] 表示插件相关,详情参考点击 url路径换成你后台地址,返回时json数组
2、html标签
</div>
</div>
<div class="modal-footer">
<input type="hidden" id="url" />
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<a onclick="authorityConfirm()" class="btn btn-success"
data-dismiss="modal">确定</a>
</div>