话不多说,直接上代码,在上方有一个zip.里面带着相关的js跟css,下载解压可用
<!DOCTYPE html>
<html>
<head>
<title>jQuery bootstrap-select可搜索多选下拉列表插件</title>
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="bootstrap-select.js">
</script>
<link rel="stylesheet" type="text/css" href="bootstrap-select.css">
<!-- 3.0 -->
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<!-- 2.3.2
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.js"></script>
-->
<script type="text/javascript">
$(window).on('load', function () {
// $('.selectpicker').selectpicker({
// 'selectedText': 'ASD'
// });
// $('.selectpicker').selectpicker('hide');
});
</script>
</head>
<body>
<label for="id_select"></label>
<select id="id_select" class="selectpicker" multiple data-live-search="true">
<option>cow</option>
<option>bull</option>
<option>ASD</option>
<option>Bla</option>
<option>Ble</option>
</select>
</div>
</body>
</html>