Bootstrap模態框及獲取checkbox選中的個數
阿新 • • 發佈:2019-02-15
<span style="font-family: Arial, Helvetica, sans-serif;"><div class="modal fade" id="sureclice" tabindex="-1" role="dialog"aria-labelledby="myModalLabel"></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="white-space:pre"> </span><div class="modal-dialog" role="document"style="width: 20%; margin-top: 15%"></span>
<span style="white-space:pre"> </span><div class="modal-content"> <div class="modal-header" style="background: #C8E7F9"> <button type="button" class="close" <span style="white-space:pre"> </span>data-dismiss="modal"aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <span style="white-space:pre"> </span><div class="modal-body"> <h4 class="modal-title" id="myModalLabel" style="text-align: center;font-weight: bold;"> <span style="white-space:pre"> </span>請選擇之後再操作 <span style="white-space:pre"> </span></h4> <span style="white-space:pre"> </span></div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">確定</button> </div> </div> </div> </div> <h3>2. 獲取checkbox選中的個數</h3> <input type="checkbox" name="ifAll"> <script> $("input[name='ifAll']:checked").length) </script>