Home > Article > Web Front-end > Jquery sets the disabled attribute of attr to control the display or hiding of a certain row_jquery
Set the disabled attribute of attr to control the display or hiding of a certain line
//加载费用项目下拉框 function loadChargeItemsSelect(status){ $("#settlementDetailInfo").find("tr[trflag=trflag]").each( function(){ $(this).children().eq(2).html($("#chargeItemsDiv").html()); var eachChargeItemId = $(this).find("input[name=eachChargeItemId]").val(); $(this).find("select[name=chargeItemsId]").val(eachChargeItemId); if(status != "HWMBS01"){ $(this).find("select[name=chargeItemsId]").attr('disabled','disabled'); $(this).find("input[name=price]").attr('disabled','disabled'); $(this).find("input[name=quantity]").attr('disabled','disabled'); $(this).find("input[name=paidinSubtotal]").attr('disabled','disabled'); } } ); }