Although you can search for the drop-down box that you made under the Easyui framework, there are many inconveniences: for example, you cannot match fuzzyly, you must search according to the first letter.
On a whim, I wanted to change the framework and write the background, and then I set up a shelf with Bootstrap. Then the two styles conflicted. Baidu made a move and found another awesome js based on Bootstrap drop-down box search function.
Case insensitive, fuzzy matching, haha, great~~
Specific usage:
<script type="text/javascript" src="<%=basePath%>/js/commons/jquery.min.js"></script><script type="text/javascript" src="${basePath}/js/silviomoreto-bootstrap/bootstrap-select.js"></script><link rel="stylesheet" type="text/css" href="${basePath}/js/silviomoreto-bootstrap/bootstrap-select.css"><!-- 3.0 --><link href="${basePath}/js/silviomoreto-bootstrap/bootstrap.min.css" rel="stylesheet"><script src="${basePath}/js/silviomoreto-bootstrap/bootstrap.min.js"></script>Initialize it: $(window).on('load', function () { $('.selectpicker').selectpicker({ 'selectedText': 'cat' }); // $('.selectpicker').selectpicker('hide');});The key code is whether the class and whether the search is supported afterwards
<select id="bs3Select" multiple data-live-search="true"> <option>cow</option> <option>bull</option> <option disabled>ox</option> </select>
If you still want to learn in depth, you can click here to learn and attach two exciting topics to you: Bootstrap learning tutorial Bootstrap practical tutorial
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.