设置attr的disabled属性可以控制某行显示或者隐藏
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//加载费用项目下拉框 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' ); } } ); } |