最近用bootstrap树形插件
html
<div class="col-md-3"> <div id="treeview4" class=""></div> </div>
引用的js
<script src="../../dist/js/bootstrap-treeview.js"></script> <script src="../../dist/js/treeview.js"></script> //为数据
<script type="text/javascript"> $(function() { $('#treeview4').treeview({ color: "#428bca", data: defaultData }); }); </script>
最后显示为乱码,查找原因后treeview.js 格式改为UTF-8
(adsbygoogle = window.adsbygoogle || []).push({});