我试图让我的 Multi-Select 看起来像我在这里找到的示例之一:https ://silviomoreto.github.io/bootstrap-select/examples/ 。我已经从这里下载了 SelectPicker.js:http: //silviomoreto.github.io/bootstrap-select/。它并排显示 2 个盒子,我无法让看起来通用的盒子消失。
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body class="container">
<br/><br/><br/><br/><br/>
<div class="container-fluid">
<div class="form-group">
<select class="selectpicker" id="rating" multiple data-selected-text-format="count > 3">
<option>G</option>
<option>PG</option>
<option>PG-13</option>
<option>R</option>
<option>NC-17</option>
</select>
</div>
</div>
<hr/>
<button onclick=doThis();>SUBMIT</button>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="../Documents/Movies_New/movies_ui/bootstrap/js/bootstrap-select.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.selectpicker').selectpicker();
function doThis(){
alert('Submit');
}
});
</script>
</body>
</html>