在项目的开发中可能会遇到 这样如下的需要
实现bootstrap搜索下拉框,本文采用bootstrap-select插件;bootstrap-select插件依赖jquery1.8+和bootstrap,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>bootstrap 搜索下拉框</title>
<!-- jquery -->
<script src="http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
<!-- bootstrap -->
<link href="http://cdn.staticfile.org/twitter-bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<script src="http://cdn.staticfile.org/twitter-bootstrap/3.3.1/js/bootstrap.min.js" type="text/javascript"></script>
<!-- bootstrap-select -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>
</head>
<body>
<select class="selectpicker show-tick form-control" data-live-search="true">
<option>四川(sichuan)</option>
<option>江西(jiangxi)</option>
<option>湖北(hubei)</option>
<option>上海(shanghai)</option>
<option>北京(beijing)</option>
<option>河北(hebei)</option>
<option>重庆(chongqing)</option>
<option>杭州(hangzhou)</option>
</select>
</body>
</html>
更多的功能和插件 地址:https://www.kancloud.cn/he_he/thinkphp5