Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 16:35:20
Original
1920 people have browsed it

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');
}
}
);
}
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template