【发布时间】:2015-03-18 11:38:48
【问题描述】:
在我的 .aspx 中,以下元素位于中继器内:
<asp:CheckBox runat="server" ID="chkNormalServiceCost" Checked="true" OnClick="EnableDisableTextBox()"/>
<asp:TextBox runat="server" ID="txtNormalServiceCost" />
而在<script> 标签中有jQuery函数:
function EnableDisableTextBox() {
$('#chkNormalServiceCost').change(function () {
if ($('#chkNormalServiceCost').is(':checked') == true)
$('#txtNormalServiceCost').prop('disabled', false);
else
$('#txtNormalServiceCost').prop('disabled', true);
});
}
但还是不行。
【问题讨论】:
-
请参阅"Should questions include “tags” in their titles?",其中的共识是“不,他们不应该”!
-
对不起,我会在下一个问题中考虑。
-
不用担心 - 只是作为旁注:)
标签: javascript c# jquery asp.net asprepeater