我從 sql 數據庫中獲取所有社區名稱并顯示帶有復選框的下拉列表。為此,我使用 for-each 循環來顯示值。下面是我從數據庫中獲取 $results 數組并將其顯示在復選框中的代碼 <div class="btn-group"> <button type="button" data-toggle="dropdown" title="Columns"> Columns <b class="caret"> </b> </button> <ul class="dropdown-menu"> <?php foreach( $results as $result){ ?> <li> <label class="checkbox"> <input type="checkbox" id="<?php echo $result['community_name']; ?>" name="multiselect" value="<?php echo $result['community_name']; ?>"><? php echo $result['community_name']; ?></input> </label> </li> <?php } ?> </ul> </div> 那么如何在 Jquery 中獲取所有選中和未選中的值?
如何在j查詢中獲取變量/非常量復選框ID和值?
飲歌長嘯
2021-06-15 08:40:58