2010-08-20 45 views

Trả lời

7

Something như thế này có thể làm điều kỳ diệu

$('#<%= CheckBox1.ClientID %>').click(function(){ 
    if ($('#<%= DropDownList2.ClientID %>').prop('disabled') != true) 
    $('#<%= DropDownList2.ClientID %>').prop('disabled', true); 
    else 
    $('#<%= DropDownList2.ClientID %>').prop('disabled', false); 
}) 
1
$("#'<%=CheckBoxId.ClientID %>'").click(function(){ 
    if($("#'<%=CheckBoxId.ClientID %>'").attr('checked')) 
     $("#'<%=DropDownListID.ClientID %>'").attr('disabled', true); 
    else 
     $("#'<%=DropDownListID.ClientID %>'").attr('disabled', false); 
}); 
Các vấn đề liên quan