0
我已經使用這個plugin進行多選,下面是我的代碼。只顯示按鈕。下拉列表不顯示,我一直沒有找到它出錯的地方。請建議。Multiselect在引導程序中的下拉菜單
<!DOCTYPE html>
<html lang="en">
<head>
<title>Form</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css">
<link rel="stylesheet" href="css/prettify.css" type="text/css">
<script src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="js/prettify.js"></script>
</head>
<body>
<form name="form1" class="form-horizontal" action="http://blahblah/blah/detr.php" onsubmit="return validateForm();" method="get">
<div class="component">
<div class="form-group">
<div class="form-group" style="text-align:center;">
<img src="img/img.png" alt="Form" />
<h2>Form </h2>
<br />
</div>
<label class="col-md-4 control-label" for="selectmultiple">Items</label>
<div class="col-md-4">
<select class="multiselect" multiple="multiple">
<option value="cheese">Cheese</option>
<option value="tomatoes">Tomatoes</option>
<option value="mozarella">Mozzarella</option>
<option value="mushrooms">Mushrooms</option>
<option value="pepperoni">Pepperoni</option>
<option value="onions">Onions</option>
</select>
</div>
</div>
</div>
</form>
<script type="text/javascript">
$(document).ready(function() {
$('.multiselect').multiselect();
});
</script>
</body>
</html>
你所有'jQuery'庫正確鏈接? – Ranjith