Home >Web Front-end >JS Tutorial >Jquery sets the disabled attribute of attr to control the display or hiding of a certain row_jquery

Jquery sets the disabled attribute of attr to control the display or hiding of a certain row_jquery

WBOY
WBOYOriginal
2016-05-16 16:35:201938browse

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');
}
}
);
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn