项目总结12:bootstrap-select下拉框模糊搜索
bootstrap select下拉框模糊搜索
关键字
bootstrap-select 下拉框模糊搜索
正文(直接上源码)
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- 1-需要下载bootstap和bootstrap-select的css和js文件 -->
<link href="static/css/bootstrap.min.css?v=1" rel="stylesheet" />
<link rel="stylesheet" href="static/css/bootstrap/bootstrap-select.min.css" />
<script src="static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/js/bootstrap/bootstrap-select.min.js"></script> <!-- 2-初始化选择框模糊搜索功能 -->>
<script type="text/javascript">
$(function(){
$(".selectpicker" ).selectpicker('refresh');
}) </script>
</head>
<body>
<table id="table_report" class="table noline" style="width:900px">
<td style="width:80px;text-align: right;padding-top: 13px;"><em>*</em>供应商:</td>
<td>
<!-- 3-循环创建下拉搜索的option标签 -->
<!-- 4-注意select标签上的class="selectpicker show-tick form-control" data-live-search="true" -->
<select name="supplierId" id="supplierId" class="selectpicker show-tick form-control" data-live-search="true">
<c:choose>
<c:when test="${not empty supplierList}">
<c:forEach items="${supplierList}" var="var" varStatus="vs">
<option value="${var.supplyId}">${var.supplyName}</option>
</c:forEach>
</c:when>
</c:choose>
</select>
</td>
</table>
</body>
</html>
总结
1-bootstrap-select的模糊搜索是针对服务器一次性返回全部数据的情况,在前端实现模糊搜搜
2-注意四步骤缺一不可
参考文献
1- https://www.cnblogs.com/zou1234/p/7891714.html
项目总结12:bootstrap-select下拉框模糊搜索的更多相关文章
- bootstrap select下拉框模糊搜索和动态绑定数据解决方法
此方法适合后台一次性返回所有数据好了废话不多说直接上代码: <!DOCTYPE html><html><head> <title>Bootstrap-s ...
- Bootstrap Flat UI的select下拉框显示不出来 问题解决
Bootstrap Flat UI的select下拉框显示不出来?看这里,恰巧今天我也遇到了这个问题: 点击Messages后并没有出现下拉列表,然而官网的index.html却能显示出来. 经过一番 ...
- firefox浏览器中 bootstrap 静态弹出框中select下拉框不能弹出(解决方案)
问题出现场景1: 在firefox浏览器中在bootstrap弹出的modal静态框中再次弹出一个静态框时 select下拉框不能弹出选项 解决方案:去掉最外层静态框的 tabindex=" ...
- select下拉框左右变换
效果图: 使用jQuery插件---multiselect2side做法: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ...
- 基于Bootstrap的下拉框插件bootstrap-select
写在前面: 在这次的项目中,没有再使用liger-ui做为前端框架了,改为了Bootstrap,这次也好接触下新的技术,在学习的过程中发现,Bootstrap的一些组件基本都是采用class的形式,就 ...
- js如何获取select下拉框的value以及文本内容
select下拉框在项目开发中是经常用到的,特别是在联级菜单方面的应用更为广泛.但是,对于一些初学者来说,如何获取下拉框子节点option的value值和文本内容,还是有一点难度的.其他的就不说了,现 ...
- jQuery插件实现select下拉框左右选择_交换内容(multiselect2side)
效果图: 使用jQuery插件---multiselect2side做法: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitio ...
- jquery操作select下拉框的多种方法(选中,取值,赋值等)
Query获取Select选择的Text和Value: 语法解释: 1. $("#select_id").change(function(){//code...}); //为Sel ...
- Django forms表单 select下拉框的传值
今儿继续做项目,学习了Django的forms生成前端的代码. forms.py class SignupForm(forms.Form): username = forms.CharField(va ...
随机推荐
- postman 的基础使用
https://blog.csdn.net/fxbin123/article/details/80428216
- git rebase 合并提交 解决超过100M文件的提交不能推送问题
git log 现在可以看到有3个提交: change 1.mp4 size to small //发现不能推送,又改回小于100M add 1.mp4 big 改变为超过100M add 1.mp4 ...
- centos7启动iptables时报Job for iptables.service failed because the control process exited with error cod
centos7启动iptables时报Job for iptables.service failed because the control process exited with error cod ...
- 虚拟机安装VMware tools
选择虚拟机菜单栏--安装VMware tools 2 然后在CentOS系统中弹出的VMware tools窗口中 右击VMwaretools-9.6.0-1294478.tar.gz 解压缩到 3 ...
- 遍历DOM树,理解更新范围
在JavaScript中,如果需求对多个元素重复进行同样的操作,就需要写一个循环来遍历选中的所有元素. 在jQuery中,当选择器返回了多个元素时,可以使用一个方法来更新所有的元素,不再需要使用循环. ...
- JS实现简单的运行代码 & 侧边广告
/* JS实现简单的运行代码功能 */<!doctype html> <html> <head> <meta charset="utf-8" ...
- MySQL系统变量配置基础
本文出处:http://www.cnblogs.com/wy123/p/6595556.html MySQL变量的概念 个人认为可以理解成MySQL在启动或者运行过程中读取的一些参数问题,利用这些参数 ...
- (转)关闭win10的Skype
https://blog.csdn.net/qq_38285661/article/details/86663849 使用win10的小伙伴们,有没有发现一个不用的功能Skype,假如你想卸载又怕卸不 ...
- Android代码规范
Android代码规范——文章来源<IT蓝豹>http://itlanbao.com/preview.aspx#1,0 [-]一Import的次序二缩进Indentation总则示例代码规 ...
- PR(Precision-Recall)曲线和mAP指标
来自: https://www.zhihu.com/question/41540197 https://www.douban.com/note/518998773/ 作者:水哥链接:https://w ...