其他分享
首页 > 其他分享> > 下拉输入搜索 bootstrap-select

下拉输入搜索 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();
})

标签:baidu,www,--,bootstrap,vo,selectpicker,搜索,com,select
来源: https://www.cnblogs.com/pansidong/p/16219824.html