62,243
社区成员




function singleChecked(combo,id,otherID)
{
var otherCombo = document.getElementById(combo.id.replace(id,otherID));
if(combo.checked)otherCombo.checked=false;
}
<asp:CheckBox runat="server" ID="Chk1" Text="option 1" onclick="singleChecked(this,'Chk1','Chk2')"/>
<asp:CheckBox runat="server" ID="Chk2" Text="option 2" onclick="singleChecked(this,'Chk2','Chk1')" />