bootstrap-select怎么设置默认全选

bootstrap-select怎么设置默认全选


慕哥9229398
浏览 3981回答 1
1回答

函数式编程

<!DOCTYPE html><html><head> <title>jQuery bootstrap-select可搜索多选下拉列表插件</title> <script src="../js/jquery-1.11.3.js"></script> <script type="text/javascript" src="../js/bootstrap-select.js"></script> <link rel="stylesheet" type="text/css" href="../css/bootstrap-select.css"/> <link href="../css/dist/css/bootstrap.css" rel="stylesheet"/> <script src="../css/dist/js/bootstrap.js"></script> <script type="text/javascript"> $(document).ready(function () { $('.selectpicker').selectpicker({ 'selectedText': 'cat', header: 'Select a condiment', 'noneSelectedText': '请选择', 'deselectAllText': '全不选', 'selectAllText': '全选' }); }); </script></head><body><select class="selectpicker" multiple data-live-search="true" data-actions-box="true"> <option>name</option> <option>addr</option> <option>email</option> <option selected>phone</option> <option>tel</option></select></body></html>
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Bootstrap