Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用引导选择(https://developer.snapappointments.com/bootstrap-select/。)进行多项选择。我想知道如何在页面加载时选择一些项目。
使用 jQuery:
$('.selectpicker').selectpicker('val', ['Ketchup','Relish']);
将适用于此选择:
<div class="container"> <select class="selectpicker" multiple> <option>Mustard</option> <option>Ketchup</option> <option>Relish</option> </select> </div>
http://www.bootply.com/64070