我最初禁用了radiobuttonlist(启用="假")。我想通过点击按钮启用它。 启用radiobuttonlist的jQuery行如下:
$("#<%=MyRadioButtonList.ClientID%>").prop("disabled", false);
但它不起作用。我注意到ASP.NET封装了输入标记 如果我理解正确,可以阻止javascript代码启用列表。
你会建议什么?
答案 0 :(得分:1)
你可以这样试试
$("#<%=MyRadioButtonList.ClientID %>").find('input').prop('disabled', false);
答案 1 :(得分:-1)
你的选择器很奇怪。你必须逃脱它。要逃避角色使用前面的'\\'。 你也可以这样做:
$(document.getElementById('<%=MyRadioButtonList.ClientID%>')).prop("disabled", false);