复选框里面的选择下拉列表不起作用

时间:2018-01-26 13:28:22

标签: javascript jquery asp.net bootstrap-multiselect

我在ASP.Net网站上使用bootstrap multiple select。我添加了这些链接

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/js/bootstrap-multiselect.js"></script>

然后在我的.cshtml

<div class="form-group">
        <label class="col-sm-3 control-label" for="SecondaryLicenseStatuses">Secondary License Statuses:</label>
        <div class="col-sm-9 container">
            <select class="form-control" id="SecondaryLicenseStatuses" data-bind="options: TabLicense.SecondaryLicenseStatuses, selectedOptions: TabLicense.SecondaryLicenseStatusesSelections, optionsText: 'name'" size="5" multiple="multiple"></select>
        </div>
    </div>

并在JS文件中

$('#SecondaryLicenseStatuses').multiselect();

它说

  

TypeError:$(...)。multiselect不是函数

现在我的应用可以通过按CTRL选择多个选择选项,但我想用它制作复选框。 谢谢!

0 个答案:

没有答案