1 GridView中代码
<asp:TemplateField>
<ItemTemplate>
<asp:RadioButton ID="RadMember" runat="server" onClick="radionCheck(this)" TextAlign="Right" />
</ItemTemplate>
</asp:TemplateField>
2 Js代码:
// GridView中选中单选按钮
function radionCheck(radioID)
{
var items=document.getElementsByTagName("input");
for(var i=0;i <items.length;i++)
{
if (items[i].type=="radio")
{
if(radioID.id!=items[i].id)
{
items[i].checked=false;
}
}
}
}