<div class="rule-multi-porp">
                        <span>
                            <%var itemList = PublicQuery.GetItemList();
                                foreach (var item in itemList)
                                {%>
                             <input id="cblGroupId_<%=item.ID %>" type="checkbox" name="cblGroupId$0" value="<%=item.ID %>" />
                            <label for="cblGroupId_<%=item.ID %>"><%=item.ItemName %></label>
                                <%}%>
                        </span>
                      </div>

Jquery:

   <script type="text/javascript">
                $("#biaoge").on('click', function () {
                    var a = $("input[name='cblGroupId$0']").prop({}).val();
                    var str = "";
                    $("input[name='cblGroupId$0']:checked").each(function(){
                        str += $(this).val() + ",";
                    })
                    console.log(str);
                });
            </script>

 

相关文章:

  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案