控制一组多选框实现单选

<!--Jquery代码-->

$(':checkbox').click(function() {
            var $this = $(this);
            if ($this.parent().hasClass('radio')) {
            var checkboxs = $this.parent().children(':checkbox');
            checkboxs.each(function(i) {
              if (i != checkboxs.index($this)) {
                     $(this).removeAttr('checked');
              }
         });
}

});

<asp:CheckBoxList runat="server" ID="chl_EquipMode" RepeatDirection="Horizontal" AutoPostBack="false" CssClass="radio">
    <asp:ListItem Value="备案">备案</asp:ListItem>
    <asp:ListItem Value="出口前">出口前</asp:ListItem>
    <asp:ListItem Value="报核前 ">报核前 </asp:ListItem>
</asp:CheckBoxList>

原文地址:https://www.cnblogs.com/chenls/p/5258792.html