<asp:RadioButton  ID="RadioYes" runat="server" Text="同意" />
                              <br />
                            <asp:RadioButton  ID="RadioNo" runat="server" Text="不同意"/>
判断这俩个第一个选中
       <asp:Button ID="BtnUpLoad" runat="server" Text="上传" onclick="BtnUpLoad_Click" 
                                  Enabled="False" />
的Enabled为true 第二个选中Enabled为false

解决方案 »

  1.   

    document.getElementById('BtnUpLoad').disabled=document.getElementById('RadioYes').checked; 
      

  2.   


      if (document.getElementById('RadioYes').checked)
    {
      return true;
    }
    else
      alert("请选择……");
      

  3.   


    <script type="text/javascript">
        function is()
        {
        if(document.getElementById("RadioYes").checked==true)
        {
        alert("YES");
        document.getElementById('BtnUpLoad').disabled=document.getElementById('RadioYes').checked; 
        }
        else if(document.getElementById("RadioNo").checked==true)
        {
        alert("NO");
        document.getElementById('BtnUpLoad').disabled=document.getElementById('RadioYes').checked;
        }
        }
        </script><asp:RadioButton  ID="RadioYes" runat="server" Text="同意" onclick="is()" /> 
                                  <br /> 
                                <asp:RadioButton  ID="RadioNo" runat="server" Text="不同意" onclick="is()"/> 
      

  4.   


    <asp:RadioButton  ID="RadioYes" runat="server" Text="同意" onclick="is()" GroupName="ss" ValidationGroup="ss"/> 
    没有ONCLICK事件
    document.getElementById('BtnUpLoad').disabled没有disabled checked这些属性,
     
    为什么会出现这样现象,我以前些怎么不这样.因为不出现所以才问大家的 帮忙看看有遇到过这种现象的没
      

  5.   

    我都测试过了,好用,不知道你的为什么不行,要不你把RadioButton换成HTML控件
    <input type="radio" id="RadioYes" runat="server" Text="同意" onclick="is()" GroupName="ss" ValidationGroup="ss"/>
    <input type="radio" id="RadioNo" runat="server" Text="同意" onclick="is()" GroupName="ss" ValidationGroup="ss"/>
      

  6.   

    我换成HTML控件能用,为什么用服务器控件不能用??
      

  7.   

    可能因为服务器控件不支持前台onclick事件,不过在我这是可以的
      

  8.   

    你机器上 服务器控件有ONCLICK事件吗??
      

  9.   

    是没有,不过我在前台强写上去也是能用的,你的问题现在不是解决了吗?
    以后能不用到服务器控件就不要用,服务器控件的垃圾东西很多,用HTML控件加个ruant="server" 比较好