復制代碼 代碼如下:
<asp:CheckBoxList ID="DDLGroups" runat="server" RepeatLayout="Table" RepeatColumns="2" RepeatDirection="Horizontal" style="border-collapse:collapse; line-height:18px;margin-left:2px;">
</asp:CheckBoxList>
復制代碼 代碼如下:
<style type="text/css">
#DDLGroups{border-collapse:collapse; line-height:18px}
#DDLGroups td{width:300px; border:1px solid #F0F8FF;padding-left:5px}
</style>
獲取所選值:
復制代碼 代碼如下:
//獲取聯系人組
$("#DDLGroups tbody tr td input:checkbox:checked").each(function () {
alert($(this).parent().find("label").html())
});