下拉输入搜索 bootstrap-select

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css">

                            <div class="col-lg-2">
                                <span class="input-group input-group-sm">
                                    <span class="input-group-addon"><b>企业列表:</b></span>
                                    <select name="com_id" id="com_id" class="selectpicker show-tick form-control" data-live-search="true" style="position: relative; left:-4px;z-index: 1;border-radius:3px;" aria-describedby="object">
                                        <option value="">--请选择--</option>
                                        <volist name="com_lists" id="vo">
                                            <option value="{$vo.id}" <?php if($vo['id'] == $com_id){echo "selected";} ?> > {$vo.id} . {$vo.name} </option>
                                        </volist>
                                    </select>
                                </span>
                            </div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>

$(function () {
     $('.selectpicker').selectpicker();
})

posted @ 2022-05-03 22:49  盘思动  阅读(266)  评论(0编辑  收藏  举报