<style type="text/css">
#cbxListParent input {vertical-align:middle;float:left;}
#cbxListQuestionType input{vertical-align:middle;}
.cb td{width:100px;}
.cb label{display:inline-block;width:80px;}
</style>
<asp:CheckBoxList ID="cbxListQuestionType"
runat="server"
CssClass="cb" //这里是css
RepeatLayout="Table" //排列方式(table,ol之类)
RepeatColumns="4" //每行几列 (4列)
RepeatDirection="Horizontal" //布局方式(纵向【默认】、横向)这里是横向
CellPadding="5" CellSpacing="5" Width="400"></asp:CheckBoxList>
<asp:CheckBoxList ID="DDLGroups" runat="server" RepeatLayout="Table" RepeatColumns="2" RepeatDirection="Horizontal" style="border-collapse:collapse; line-height:18px;margin-left:2px;">
</asp:CheckBoxList>
[css]
<style type="text/css">
#DDLGroups{border-collapse:collapse; line-height:18px}
#DDLGroups td{width:300px; border:1px solid #F0F8FF;padding-left:5px}
</style>
获取所选值:
[javascript]
//获取联系人组
$("#DDLGroups tbody tr td input:checkbox:checked").each(function () {
alert($(this).parent().find("label").html())
});