前端页面select标签

tech2024-05-16  78

前端页面select标签

(1)前端页面的select标签disabled=“disabled”时不能向后台传送数据 (2)可以采取措施在提交的时候将disabled的属性去除

var data = $("#<%=divID %>edit2").find("select[name='holidaySettlementSumFlag']"); data.prop("disabled",false);

(3)通过添加input标签实现数据传值的操作,input的标签的值随着option标签的值的改变随之改变即可

<input type="hidden" name="holidaySettlementSumFlagRecord" value="${config.holidaySettlementSumFlag}" disabled="disabled"> <select name="holidaySettlementSumFlag" ${(config.settlementMode=="T" && config.settlementInterval==1)?"":"disabled='disabled'"}> <option ${config.holidaySettlementSumFlag==0?"selected='selected'":"" } value="0">不汇总</option> <option ${config.holidaySettlementSumFlag==1?"selected='selected'":"" } value="1">汇总</option> </select>
最新回复(0)