asp.net里RadioButtonList选择的问题

我有一个RadioButtonList 想要点同意的时候按钮可用 点不同意按钮不可用 默认是不可用 现在点了同意或者不同意 我的那个btnSubmit按钮都会变成可用 而且不会再变回不可用 要怎么解决

    function acceptprotocol(){
        if(document.getElementById("rblAccept").SelectValue==0{
            document.getElementById("btnSubmit").disabled=true;
        }
        else{
            document.getElementById("btnSubmit").disabled=false;
        }
    }

RadioButtonList那里是这样的

<asp:RadioButtonList ID="rblAccept" runat="server" RepeatDirection="Horizontal" style="margin:auto" onclick="acceptprotocol()">
<asp:ListItem Value="0">同意</asp:ListItem>
<asp:ListItem Value="1" Selected="True">不同意</asp:ListItem>
</asp:RadioButtonList>

js语法错了,而且客户端没用SelectValue属性,而且radio会变为2个 客户端radio对象,对应的radio ID也会变化,楼主多了解下客户端html

改下面这样



    function acceptprotocol(){
        var radios=document.getElementsByName('rblAccept');
        document.getElementById("btnSubmit").disabled = !radios[0].checked;
    }

document.getElementById("rblAccept").SelectValue==0,这句后边你加上")"试试,你这里丢了")"了