如果 RadioButtonList 的值为零,我有这个代码来禁用文本框。但它不起作用我不知道为什么。
<script type="text/javascript">
$(function () {
$("#RadioButtonList1").change(function() {
var st = ("#RadioButtonList1").val();
if (("#RadioButtonList1").val() == "1") {
$("#TextBox_ArrivalDate").prop("disabled",false);
}else{
$("#TextBox_ArrivalDate").prop("disabled",true);
}
);
});
</script>
这是我的 RadioButtonList
<asp:Label ID="type" Cssclass="label" runat="server" Text="Please Choose One"></asp:Label>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" style="margin-left: 47px" Width="153px">
<asp:ListItem Value="1">Round Trip</asp:ListItem>
<asp:ListItem Value="0">One Way</asp:ListItem>
</asp:RadioButtonList>
梦里花落0921
狐的传说
胡说叔叔
相关分类