Posted in Javascript onSeptember 06, 2013
.checkboxlist label
{
margin-right: 20px;
} var label;
$("#ddlplatform input:checkbox:checked").each(function () {
label += $(this).next().html();
}); <asp:CheckBoxList ID="ddlplatform" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="checkboxlist"> <asp:ListItem Value="APP">APP</asp:ListItem> <asp:ListItem Value="移动触屏">移动触屏</asp:ListItem> <asp:ListItem Value="PC">PC</asp:ListItem> <asp:ListItem Value="微信">微信</asp:ListItem> <asp:ListItem Value="微博">微博</asp:ListItem> </asp:CheckBoxList>
//使用平台
string Platfrom = string.Empty;
foreach (ListItem li in this.ddlplatform.Items)
{
if (li.Selected)
{
Platfrom += li.Text + ",";
}
}
Platfrom = Platfrom.TrimEnd(','); CheckBoxList多选样式jquery、C#获取选择项
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@