首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

【【【【jstree 移除节点的有关问题】】】】。讨论有分啊速来。

2012-10-23 
【【【【jstree 移除节点的问题】】】】。。。。。。。。。。。。。。。讨论有分啊!!!!!!!速来。。。。这是我的代码JScript codefuncti

【【【【jstree 移除节点的问题】】】】。。。。。。。。。。。。。。。讨论有分啊!!!!!!!速来。。。。
这是我的代码

JScript code
   function customMenu(node) {            var items = {                "create": null,                "rename": null,                "remove": null,                "ccp": null, "menu_delete": {                    "label": "删除",                    "icon": "../../img/delete.png",                    "action": function(obj) {                        //alert(obj.attr("rel"));                        var id = obj.attr("id");                        if (id == "1") {                            alert("根节点不能删除")                            return false;                        }                        if (id && confirm("确定删除吗?")) {                            jQuery.ajax({                                url: "AjaxService.ashx",                                cache: false,                                data: {                                    CommandName: "DeleteClassByID",                                    id: id                                },                                success: function(data) {                                    // alert("ok");                                    $("#class_tree").jstree("remove", null);                                }                            });                        }                    }                }            }}


[解决办法]
看到说讨论也有分,所以我进来了,坐等LZ结帐,看是不是有分

但又不好意思,所以说两句

$("#class_tree").jstree("remove", null);

虽然没用过jstree,但看这个操作,如果$("#class_tree")指的是整个树的话,

那你remove的动作做用在什么上面, null???

热点排行