不灭的焱

加密类型:SHA/AES/RSA下载Go
复合类型:切片(slice)、映射(map)、指针(pointer)、函数(function)、通道(channel)、接口(interface)、数组(array)、结构体(struct) Go类型+零值nil
引用类型:切片(slice)、映射(map)、指针(pointer)、函数(function)、通道(channel) Go引用

作者:AlbertWen  添加时间:2020-03-12 18:30:11  修改时间:2025-11-10 20:59:17  分类:06.前端/Vue/Node.js  编辑

jquery.chosen.js 查询时,chosen默认从第一个字符搜索,所以写中间的字符搜索时,是搜索不出来的。

若想实现中间字符的模糊查询,下面的js中(search_contains 属性为 true 即可)可以让chosen搜索选项的中间及末尾字符:

  • no_results_text:是搜索不到内容时,显示的提示语
  • placeholder_text:是下拉选项默认显示的文字
  • disable_search_threshold:是select的option选项大于等于此值,才会显示查询的文本框
jQuery(".chosen-select").chosen({
	no_results_text: "My language message.", 
	placeholder_text : "My language message.", 
    search_contains: true,
    disable_search_threshold: 10
});