联系我们
简单又实用的WordPress网站制作教学
当前位置:网站首页 > 网页前端技术 > 正文

CheckBoxList多选样式jquery、C#获取选择项 - Web前端

作者:98wpeu发布时间:2026-10-12分类:网页前端技术浏览:2


导读:复制代码代码如下:.checkboxlistlabel{margin-right:20px;}复制代码代码如下:varlabel;$("#ddlplatFORMin...
复制代码 代码如下:
.checkboxlistlabel
{
margin-right: 20px;
}

复制代码 代码如下:
var label;
$("#ddlplatFORMinput:Checkbox:checked").each(function () {
label += $(this).next().html();
});

复制代码 代码如下:
<asp:CheckBoxList ID="ddlplatform" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"
CSSclass="checkboxlist">
<asp:ListItemvalue="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(',');

标签:多选样式WebjqueryCheckBoxList


网页前端技术排行
最近发表
网站分类
标签列表