我有两个多选列表视图(dropdownList multiple),当用户在第一个列表中选择一个选项时,自动插入/传输到第二个多选列表(dropdownList),并从第一个多选列表中删除该选项。
<label>Selectable Services</label>
<select class="span12" id="selectService" data-bind="foreach: groups, value: selectedOption" Multiple="Multiple" height="10">
<optgroup data-bind="attr: { label: label }, foreach: children">
<option data-bind="text: label, option: $data"></option>
</optgroup>
</select>
<label>Selected Services</label>
<select class="span12" id="selectedService" multiple="multiple" height="5" data-bind="options: allServices, selectedOptions: selectedServices"></select>