页面代码:
<asp:RadioButtonList ID="RadioButtonList1" on
RepeatDirection="Horizontal">
</asp:RadioButtonList>
js部分:
<script type="text/javas
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>