**
bootstrap-select实现加载时默认选中功能
**前言,萌新最近有了个jq项目的select多选功能的需求,就找到了下面的插件想要实现这个功能
bootstrap-select
因为萌新见识浅薄,所以没有找到默认展示某几项的demo,就尝试着自己写了一下
function loadInfo() {
//默认数据
var area = document.getElementById("id_select");
area.options.length = 0;
/*var result = {};
$('#demo option').each(function(){
result[$(this).val()] = $(this).text();
})
for (var item in result) {
area.options.add(new Option(result[item], item,));
}*/
$('.selectpicker').selectpicker('refresh');
/*var defSelOption = ['111','222','333','444'];
var showSelOption = '';
if (defSelOption.length > 0){
$(&