chosen-select multiple 下拉框多选,赋值

【chosen-select multiple 下拉框多选,赋值】

function loadSelectHardversion(key){
var html = "";
$.ajax({
url : "/system/relatedAttributes/selectorsList", // 服务器数据的加载地址
data : {
'key' : key
},
success : function(data) {
//加载数据
for (var i = 0; i < data.length; i++) {
html += ''
}
$("#hardversion").append(html);
$("#hardversion").chosen({
maxHeight : 200,
width: '100%'
});

var hardversion1 = $("#hardversion1").val();
var data = https://www.it610.com/article/[];
data = https://www.it610.com/article/hardversion1.split(",");

$("#hardversion").val(data);
$("#hardversion").trigger("chosen:updated");
}
});
}

    推荐阅读