答案 0 :(得分:2)
//bind chosen
$(".chosen-select").chosen({no_results_text: "Oops, nothing found!"});
$('.chosen-select').on('change', function(evt, params) {
alert($(".chosen-select").val());
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://harvesthq.github.io/chosen/chosen.css">
<script src="http://harvesthq.github.io/chosen/chosen.jquery.js" type="text/javascript"></script>
<select id="searchBox" data-placeholder="Type 'C' to view" style="width:350px;" multiple class="chosen-select chosen-select-no-results" tabindex="11">
<option value=""></option>
<option>Coffee</option>
<option>Tea</option>
<option>Milk</option>
<option>Water</option>
<option>Juice</option>
</select>
&#13;
答案 1 :(得分:1)
使用jquery tagit插件来实现功能
http://aehlke.github.io/tag-it/