combobox联动设置
$(document).ready(function() { $(‘#gdfsdl1‘).combobox({ onSelect: function(record){ $(‘#gdfsxl1‘).combobox(‘clear‘); if(record.value == "内部转供电"){ $(‘#gdfsxl1‘).combobox({data:[{value:‘交警‘},{value:‘分局‘},{value:‘市局‘}]}); }else if(record.value == "社会转供电"){ $(‘#gdfsxl1‘).combobox({data:[{value:‘商铺‘},{value:‘路灯‘},{value:‘铁塔公司‘},{value:‘公交‘}]}); }else{ $(‘#gdfsxl1‘).combobox({data:[{value:‘各供电局‘}]}); } } }); })
<tr> <td style="width: 10%;text-align: right;word-spacing: 10px;"> 供电方式大类: </td> <td style="width: 20%" > <select id="gdfsdl1" data-options="editable:false" class="easyui-combobox" panelHeight="auto" style="width:75%"> <option value="内部转供电">内部转供电</option> <option value="社会转供电">社会转供电</option> <option value="供电局转供电">供电局转供电</option> </select> </td> <td style="width: 10%;text-align: right;word-spacing: 10px;"> 供电方式小类: </td> <td style="width: 20%" > <input id="gdfsxl1" class="easyui-combobox" data-options="editable:false,textField: ‘value‘" panelHeight="auto" style="width:75%"> <!--<select id="gdfsxl1" data-options="editable:false" class="easyui-combobox" panelHeight="auto" style="width:75%"> </select>--> </td> </tr>
时间: 2024-10-11 08:02:35