easyui 选择框默认屏蔽了onChange()事件,在使用时可以使用自带的onSelect事件
//选择后触发事件,
$(function(){
$("#groupCombobox").combobox({
onSelect:function(record){
var curValue=$('#groupCombobox').combobox('getValue');
if(curValue==1){
$("[name='userGroupRight']").attr("checked",'true');
}else if(curValue==2){
$("[name='userGroupRight']").removeAttr("checked");
$("[name='userGroupRight']").each(function(){
if($(this).val()==1){
$(this).attr("checked",'true');
}
if($(this).val()==3){
$(this).attr("checked",'true');
}
if($(this).val()==5){
$(this).attr("checked",'true');
}
})
}else{
$("[name='userGroupRight']").removeAttr("checked");
}
}
});
});
注:一般在页面弹出新增窗口时,有下拉选择框,此激活代码应与dialog放在一块才能激活。
<div id="groupForm" class="easyui-dialog" style="width:425px;height