HTML:
<label class="home">Document</label>
<input id="write"/>
JS:
var self=this;
this.elemsel=ko.observableArray([]);
$('#write').kendoMultiSelect({
autoWidth: false,
value: self.elemsel,
optionLabel: "Select...",
dataSource: {
data: list
}
});
console.log(self.elemsel());
我喜欢这样,自我包含所选元素。