$(function(){
$("#parentCategoryCode").combotree({
url:'${basePath}serviceController/foodAdditiveCategoryService.tree.do',
editable:false,
cascadeCheck:true,
lines:true,
onSelect:function(note){
var val = note.id;
var id = $("#primaryValue").val();
if(val == id){
alert("自己不能做自己父类,请重选");
$("#parentCategoryCode").combotree("setValue",null);
return ;
}
}
});
});
选中自己后时下拉树赋值为null,可是赋值不成功,赋值的还是自己,这是什么原因啦!
调试下看看,那里是怎么执行的