JS实现单选                       

<script type="text/javascript">
  function CheckSelect() {

    //得到CheckBoxList 的ID

    var tb = document.getElementById("<%=cblHandleContent.ClientID%>");

    //循环得到CheckBoxList 的子集,并控制它的选中状态

    for (var i = 0; i < tb.cells.length; i++) {
      var chk = tb.cells[i].firstChild;
      if (chk != event.srcElement) {
        chk.checked = false;
        }
      }
 }
</script>

后台绑定好的服务器控件

<asp:CheckBoxList onclick="javascript:CheckSelect();" ID="cblHandleContent" RepeatDirection="Horizontal" runat="server" >
</asp:CheckBoxList>          

 

相关文章:

  • 2021-12-19
  • 2021-07-19
  • 2021-04-19
  • 2021-10-31
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-21
  • 2021-09-07
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
相关资源
相似解决方案