从后台取到json对象数组后,前台以树的形式显示 http://www.ztree.me/v3/demo.php#_201用这个吧.. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你搜索下jquery tree ,有很多树插件,但大多数是国外的,国内有一款叫ztree比较火,看楼主自己选择我最近用到一款叫jstree , $("#menutree").jstree({ "core": { "animation": 0, "check_callback": true, "themes": { "stripes": true }, "data": { 'url': '../ajax/s_module.ashx?flag=1' } } });//后台json格式[{"data":"aaa","attr":{"id":"1"},"state":"open","children":[{"data":"bbb","attr":{"id":"cccc"},"state":"closed"}]}] 初学javascript 关于dom的一些疑问 AJAX键盘上下选择 【100分】如何让一个文本框只能删除不能输入字符? 在线等。js创建html对象问题 循环获取某个TABLE中的TD内容 如何用 js 让 <tr> 不可用? 在线等! 求高手帮忙写一段javascript... textarea.value的问题,版主来帮忙看看 请问窗口最小化的语句 js或jQuery高手请进,处理图片的一个问题 用jQuery如何获取iframe中的元素 图片旋转以后在IE6,7下显示不全
我最近用到一款叫jstree ,
$("#menutree").jstree({
"core": {
"animation": 0,
"check_callback": true,
"themes": { "stripes": true },
"data": {
'url': '../ajax/s_module.ashx?flag=1'
}
}
});//后台json格式
[{"data":"aaa","attr":{"id":"1"},"state":"open","children":[{"data":"bbb","attr":{"id":"cccc"},"state":"closed"}]}]