destoon後臺自定義欄位複選框多選框增加全選全不選按鈕
阿新 • • 發佈:2019-01-02
修改include/fields.func.php 中的函式function fields_show()
在177行
case 'checkbox':
if($v['option_value']) {
$html .= '<span id="'.$v['name'].'">';
的下面增加
//增加全選
$html .= ' <input type="button" value="全選" id="all"/> <input type="button" value="全不選" id="resove"/> <script type="text/javascript">$("#all").click(function(){ $(".chengshi:checkbox").prop("checked",true); }); $("#resove").click(function(){ $(".chengshi:checkbox").prop("checked",false); }) </script>';