gpt4 book ai didi

javascript - 动态 jQuery 多选插件

转载 作者:行者123 更新时间:2023-12-01 04:05:22 25 4
gpt4 key购买 nike

我一直在尝试将此脚本安装到我的网站 http://www.jqueryscript.net/form/Dynamic-jQuery-Multi-Select-Tags-Input-Plugin-Fast-Select.html但它不适用于我的代码

<head>
<meta charset="UTF-8">
<title>Page</title>

<link rel="stylesheet" href="plugins/dist/fastselect.min.css">
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="plugins/fastselect/dist/fastselect.min.js"></script>
</head>

<body>
<select class="multipleSelect" multiple name="language">
<option value="Bangladesh">Bangladesh</option>
<option value="Barbados">Barbados</option>
<option value="Belarus">Belarus</option>
<option value="Belgium">Belgium</option>
</select>

<script>
$('.multipleSelect').fastselect();
</script>

</body>

最佳答案

根据doc一种可能性是:

$('.multipleSelect').fastselect();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>


<link rel="stylesheet" href="https://rawgit.com/dbrekalo/fastselect/master/dist/fastselect.min.css">
<script src="https://rawgit.com/dbrekalo/fastselect/master/dist/fastselect.standalone.min.js"></script>


<select class="multipleSelect" multiple name="language">
<option value="Bangladesh">Bangladesh</option>
<option value="Barbados">Barbados</option>
<option value="Belarus">Belarus</option>
<option value="Belgium">Belgium</option>
</select>

另一种可能性是添加fastsearch lib:

$('.multipleSelect').fastselect();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>


<link rel="stylesheet" href="https://rawgit.com/dbrekalo/fastselect/master/dist/fastselect.min.css">
<script src="https://rawgit.com/dbrekalo/fastsearch/master/dist/fastsearch.min.js"></script>
<script src="https://rawgit.com/dbrekalo/fastselect/master/dist/fastselect.min.js"></script>

<select class="multipleSelect" multiple name="language">
<option value="Bangladesh">Bangladesh</option>
<option value="Barbados">Barbados</option>
<option value="Belarus">Belarus</option>
<option value="Belgium">Belgium</option>
</select>

关于javascript - 动态 jQuery 多选插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41880405/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com