var tblusergroup=""; var value=""; var cf=true; $("#tblusergroup option").each(function(){ value=$(this).val(); if($("#tblusergroup option[value='"+value+"']").size()>1){ cf=false; return; }else{ tblusergroup+=$(this).val()+","; } }); if(!cf){ jAlert("组内用户有重复","提示信息"); return; }