页面代码:

<asp:RadioButtonList ID="RadioButtonList1" onclick="hao()" runat="server"
                        RepeatDirection="Horizontal">
                </asp:RadioButtonList>

js部分:

<script type="text/javascript">

function hao()
        {
            var aa=document.getElementsByName("RadioButtonList1");
            var cc="";
            for(var   i=1;i <aa.length;i++)
            {
                if(aa[i].checked)
                { 
                    cc=aa[i].value;
                }
            }
            if(cc=="21")
            {
                document.getElementById("hwmc").style.display="";
                document.getElementById("hwsl").style.display="";
            }
            if(cc=="22")
            {
                document.getElementById("hwmc").style.display="none";
                document.getElementById("hwsl").style.display="none";
            }
        }

</script>

相关文章:

  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
  • 2021-12-14
  • 2021-07-06
  • 2022-01-10
相关资源
相似解决方案