Copy Code code as follows:
. CheckBoxList Label
{
margin-right:20px;
}
Copy Code code as follows:
var label;
$ ("#ddlplatform input:checkbox:checked"). each (function () {
Label + $ (this). Next (). HTML ();
});
Copy Code code as follows:
<asp:checkboxlist id= "Ddlplatform" runat= "server" repeatdirection= "horizontal" repeatlayout= "Flow"
cssclass= "CheckBoxList" >
<asp:listitem value= "APP" >APP</asp:ListItem>
<asp:listitem value= "Mobile touch Screen" > Mobile touch screen </asp:ListItem>
<asp:listitem value= "PC" >PC</asp:ListItem>
<asp:listitem value= "micro-letter" > Micro-letter </asp:ListItem>
<asp:listitem value= "Weibo" > Weibo </asp:ListItem>
</asp:CheckBoxList>
Copy Code code as follows:
Using the Platform
String platfrom = String. Empty;
foreach (ListItem li in This.ddlplatform.Items)
{
if (li. Selected)
{
Platfrom + + li. Text + ",";
}
}
Platfrom = Platfrom.trimend (', ');