权祖

下拉框固定值数据回显

<div class="form-group">
    <div class="select_div">
        <input class="form-control" type="hidden" id="brands" th:value="${fikabivoidfinancereport.brand}">
        <select class="selectpicker"  id="brand" name="brand">
            <option selected="selected" value="">请选择品牌</option>
            <option >KuKo</option>
            <option >CoCo</option>
        </select>
    </div>
</div>

//品牌值回显
$(function() {
    var brands = $('#brands').val();
    if(brands != ''){
        $('#brand').val(brands);
    }
});

 

posted on 2020-04-30 14:52  IT磊哥  阅读(353)  评论(0编辑  收藏  举报

导航