<input class="mini-hidden" name="STATE" id="STATE1" /> //逐个列举 可设置每个样式 <td><input type="checkbox" class="sale_2"id="chkState1" name="chkState" value="拟建" onclick="changeValue()" title="有意向"/>拟建</td> <td><input type="checkbox" class="sale_2"id="chkState2" name="chkState" value="手续" onclick="changeValue()" title="正在办理或已办理相关手续"/>手续</td> <td><input type="checkbox" class="sale_1"id="chkState8" name="chkState" value="售罄" onclick="changeValue(8)" title="售完"/>售罄</td>
//修改项目进展状态 function changeValue(id) { if($("#chkState8:checked").val()!=undefined){ //选择chkState8使其余不可选 $("[class='sale_2']").attr('disabled',true).attr('checked',false); document.getElementById("STATE1").value=($("#chkState8:checked").val()); }else{ $("[class='sale_2']").attr('disabled', false); var sta=""; for(var i=1;i<8;i++){ if($("#chkState"+i+"':checked").val()!=undefined){ sta+=($("#chkState"+i+"':checked").val()+","); } } document.getElementById("STATE1").value=sta.substring(0,sta.length-1); } }
//统一显现
<input name="HOUSE_TYPE" class="mini-checkboxlist" repeatLayout="flow"popupWidth="200"url="${ctx}/sysDict/queryByGroup?Name=建筑分类" textField="NAME" valueField="NAME"/>