日期:2014-05-17  浏览次数:20368 次

jquery方式操作radionbutton
想实现选择<=1年,月结 >= 60天/<60天 那个radiobutton不可用,选择> 1 年 ,月结 < 60 天 和月结 >= 60天 这两个radiobutton不可用。
以下是我实现的办法 在火狐下面没有问题 但是在ie上只要选择<=1年或者> 1 年的radiobutton下面三个全部不可用,再怎么点击都没有反应了,不知道什么原因 求大师帮忙。


contractApp.aspx
<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Head" runat="Server">
<script type="text/javascript">
        function IsEnable() {
            $("#ctl00_WFContent2_rdPay1").attr("disabled", true);
            $("#ctl00_WFContent2_rdPay2").attr("disabled", true);
            $("#ctl00_WFContent2_rdPay3").attr("disabled", false);
            if ($("#ctl00_WFContent2_rdPay3")[0].checked) {
                $("#ctl00_WFContent2_rdPay3").removeAttr("checked");
            }
        }
        function IsDisEnable() {
            $("#ctl00_WFContent2_rdPay1").attr("disabled", false);
            $("#ctl00_WFContent2_rdPay2").attr("disabled", false);
            $("#ctl00_WFContent2_rdPay3").attr("disabled", true);
            if ($("#ctl00_WFContent2_rdPay1")[0].checked) {
                $("#ctl00_WFContent2_rdPay1").removeAttr("checked");
            }
            else if ($("#ctl00_WFContent2_rdPay2")[0].checked) {
                $("#ctl00_WFContent2_rdPay2").removeAttr("checked");
            }
        }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="WFContent2" runat="Server">
<asp:RadioButton ID="rdDate1" runat="server" GroupName="GroupCAppDate" Enabled="true" Text="<= 1年" />
<asp:RadioButton ID="rdDate2" runat="server" GroupName="GroupCAppDate" Enabled="true" Text="> 1 年" />


<asp:RadioButton ID="rdPay1" runat="server" GroupName="CAppPay" Enabled="true" Text="月结 < 60 天" />
<asp:RadioButton ID="rdPay2" runat="server" GroupName="CAppPay" Enabled="true" Text="月结 >= 60天" />
<asp:RadioButton ID="rdPay3" runat="server" GroupName="CAppPay" Enabled="true" Text="月结 >= 60天/<60天" />
</asp:Content>

contractApp.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
       &nb