【ztree】ztree例子
<script language="javascript" type="text/javascript" src="js/jquery.js"></script> <script language="javascript" type="text/javascript" src="js/jquery.ztree.core-3.0.js"></script> <link type="text/css" rel="stylesheet" href="css/zTreeStyle/zTreeStyle.css" />
<ul id="tree" class="ztree"></ul>
$(document).ready(function(){ var Index = { init:function(){ var setting = { treeId:'tree' }; var data = [ {id:1, pId:0, name: "父节点1"}, {id:11, pId:1, name: "子节点1"}, {id:12, pId:1, name: "子节点2"} ]; var zTree = $.fn.zTree.init($("#tree"), setting, data); },
}
$(Index.init);
});
计划、执行、每天高效的活着学着