如何解决如何将Bootstrap Multiselect Dropdown更改为Multiselect已打开列表框?
我在“ MVC视图”页面上有一个下拉多个选择列表,正在处理数据模型,但我需要一个打开的列表框,而不是一个下拉列表,有一些脚本,我无法找到合适的属性作为列表框
<div class="form-group form-row" id="ListBoxDiv">
<div class="col-md-12">
@Html.ListBoxFor(
x => x.MainCategories,Model.SubCategories,htmlAttributes: new { @class = "form-control mdb-select",@required = true,@id = "ListBoxForSelectables",@multiple="True" }
)
</div>
</div>
这是脚本:
<script language="javascript" type="text/javascript">
var jsonObject = [];
$(document).ready(function () {
$('#ListBoxForSelectables').multiselect(
{
includeselectAllOption: true,selectAllValue: 'multiselect-all',enableFiltering: true,enableCaseInsensitiveFiltering: true,maxHeight: '300',buttonWidth: '300',selector: "[data-tooltip=tooltip]",});
$('#ListBoxForSelectables').change(function () {
/*...*/
})
/*...*/
});
function GetProducts(_territoryId) {
/*...*/
$("#ListBoxForSelectables").empty();
$("#ListBoxForSelectables").multiselect("refresh");
$('#ListBoxForSelectables').multiselect('rebuild');
}
function GetDocuments(_productId) {
$("#ListBoxForSelectables").empty();
$("#ListBoxForSelectables").multiselect("refresh");
$('#ListBoxForSelectables').multiselect('rebuild');
/*...*/
}
</script>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。