javascript代码:
<script language="javascript" type="text/javascript">
function clickit() {
var dom=document.all;
var el=event.srcElement;
if(el.tagName=="INPUT"&&el.type.toLowerCase()=="radio")
{
for(i=0;i<dom.length;i++)
{
if(dom[i].tagName=="INPUT"&&dom[i].type.toLowerCase()=="radio")
{
dom[i].checked=false;
}
}
}
el.checked=true;
}
</script>
单选按钮的代码如:
<asp:RadioButton ID="RadioButton1" runat="server" οnclick="clickit();"
Text='<%# Eval("Text")%>' />
转载于:https://www.cnblogs.com/yongheng178/archive/2010/11/22/1884387.html