我有一个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>