bootstrap-select实现下拉多选搜索框
程序员文章站
2022-03-09 13:32:43
...
开头引入文件:
bootstrap-select.css
bootstrap-select.min.css
bootstrap-select.js
bootstrap-select.min.js
<div class="form-group">
<label class="col-sm-3 control-label">知识点标签:</label>
<div class="col-sm-8">
<select class="selectpicker form-control" multiple title="请选择" required>
<c:forEach items="${knowList }" var="know">
<option value="${know.id }">${know.name }</option>
</c:forEach>
</select>
</div>
</div>
var row = getSelectedRow();
var arr = new Array();
arr = row.knowId.split(",");
$('.selectpicker').selectpicker({
liveSearch:true,
size:5
});
$('.selectpicker').selectpicker('val',arr);
$('.selectpicker').selectpicker('refresh');
上一篇: QML虚拟键盘控制弹出隐藏
下一篇: jquery如何添加节点?