之前随便写写,发现需要的人挺多,抽了点时间写了个完整的已上次到资源。 http://download.youkuaiyun.com/source/3461323
首先感谢http://www.codesky.net/article/doc/200810/200810166672871.htm 的作者。控件原理就请到原文去看了。
网上找了一下。etx也有类似的控件,无奈它的类库实在是不小,就自己封装了一个。
HTML代码
<head>
<!--jquery jsTree控件-->
<link rel="stylesheet" type="text/css" href="${ctx}/js/jstree/tree_component.css" />
<script type="text/javascript" src="${ctx}/js/jstree/css.js"></script>
<script type="text/javascript" src="${ctx}/js/jstree/tree_component.min.js"></script>
<script src="${ctx}/js/jquery.js"type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
initSelect("