详细点

解决方案 »

  1.   

       问题补充:
    CheckBoxList 中如何清空以前选择!!
      

  2.   


       function UnCheckAll() {
                var CheckBoxList = document.getElementById('cbx');
                //设置RepeatLayout="Table",默认就是table 
                if (CheckBoxList.tagName == "TABLE") {
                    for (i = 0; i < CheckBoxList.rows.length; i++) {
                        for (j = 0; j < CheckBoxList.rows[i].cells.length; j++) {
                            if (CheckBoxList.rows[i].cells[j].childNodes[0]) {
                                CheckBoxList.rows[i].cells[j].childNodes[0].checked = false;
                            }
                        }                }
                }
            }
     &nbsp;&nbsp;<input type="button" class="buttons" value="全不选" onclick="UnCheckAll()" /><br /><br />
                   <asp:CheckBoxList ID="cbx" runat="server" RepeatColumns="4" RepeatDirection="Horizontal" RepeatLayout="Table" CssClass="check" CellSpacing="0" CellPadding="0">
                   </asp:CheckBoxList>
      

  3.   

    CheckBoxList1.ClearSelection();
    直接这样就全部清空