Jquery sets the disabled property of attr to control whether a line is displayed or hidden

  • 2020-03-30 04:01:50
  • OfStack

Setting the disabled property of attr controls whether a line is displayed or hidden


//Load charge item drop-down box
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');
}
}
);
}

Related articles: