bootstrap-multiselect 多选
官方教程
http://www.kuitao8.com/demo/20140224/1/bootstrap-multiselect-master/index.html
使用方法:
第一步引用样式以及相关JS
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script> <!-- Include the plugin's CSS and JS: -->
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css"/>
第二步 构造Selection(注意 需要设置multiple属性,否则依然是单选模式,multiple="multiple" )
<!-- Build your select: -->
<select class="multiselect" multiple="multiple">
<option value="cheese">Cheese</option>
<option value="tomatoes">Tomatoes</option>
<option value="mozarella">Mozzarella</option>
<option value="mushrooms">Mushrooms</option>
<option value="pepperoni">Pepperoni</option>
<option value="onions">Onions</option>
</select>
第三步 初始化插件:
<script type="text/javascript">
$(document).ready(function() {
$('.multiselect').multiselect();
});
</script>
常用方法:
- select
$('#cid').multiselect('select', arr[i]); 给控件设置选中项
- 获取值
$('#cid').val();获取控件所有的选中值
bootstrap-multiselect 多选的更多相关文章
- web 前端常用组件【03】Bootstrap Multiselect
实际的项目网站中或多或少的或用到多选框,我选用的一款是 Bootstrap Multiselect. 官方文档:http://www.kuitao8.com/demo/20140224/1/boots ...
- Jquery ajax 绑定multiselect多选下拉选项,同时异步执行返回值
Jquery ajax 绑定multiselect多选下拉选项,同时异步执行获取返回值 function load(mslt_employees,belongto,mark) {//传入$(#ID) ...
- bootstrap multiselect的使用 多选下拉菜单
官网网址: http://davidstutz.de/bootstrap-multiselect/
- JS组件系列——两种bootstrap multiselect组件大比拼
前言:今天继续来看看bootstrap的另一个组件:multiselect.记得在项目开始之前,博主项目组几个同事就使用哪些js组件展开过讨论,其中就说到了select组件,由于项目的整体风格使用的b ...
- bootstrap multiselect两大组件
组件说明以及API 1.第一个组件——multiple-select.这个组件风格简单.文档全.功能强大.但是觉得它选中的效果不太好.关于它的效果展示,我们放在后面. 2.第二个组件——bootstr ...
- Bootstrap Multiselect插件使用步骤以及常见参数配置介绍
Multiselect是基于jQuery插件的,它可以以下拉列表的形式为用户提供选择内容,能进行单选或者多选.它应用的主要步骤如下: 一,引入需要的相关js和css文件 既然是Bootstrap插件, ...
- jquery.multiselect 多选下拉框实现
第一步:链接下列文件,如果没有,到此网页下载 https://github.com/ehynds/jquery-ui-multiselect-widget,此插件基于jquery ,所以jquery的 ...
- js:jquery multiSelect 多选下拉框实例
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Bootstrap Multiselect
Getting Started Link the Required Files First, the jQuery library needs to be included. Then Twitter ...
- bootstrap table 复选框选中后,翻页不影响已选中的复选框
使用的 jquery版本为 2.1.1 在项目中发现bootstrap table的复选框选中后,翻页操作会导致上一页选中的丢失,api中的 bootstrapTable('getSelections ...
随机推荐
- js将数组根据条件分组
//将数组根据条件分组 function getTreeDateByParam(list, param, fun){ var data = {}; if(list && list.le ...
- MFC头文件
AFX.H struct CRuntimeClass; // object type information class CObject; // the root of all objects cla ...
- 下划线字符串camel
const camel = (str) => { let slices = str.split('_'); let result = []; for(let i = 1, len = slice ...
- httphandler httpmodule一些个人理解
asp.net 对于http请求需要走一个管道就行一层一层的过滤:比如身份验证,根据请求的资源不同分发给具体哪个dll来处理 这些管道中就是httpmodule.所以我们自己写的httpmodule实 ...
- Vuejs——(6)Vuejs与form元素
版权声明:出处http://blog.csdn.net/qq20004604 目录(?)[+] 资料来于官方文档: http://cn.vuejs.org/guide/forms.html 本 ...
- 配置docker官方源并用yum安装docker
一.docker的官方安装文档: https://docs.docker.com/engine/installation/linux/centos/ 由docker给的文档可以看出它也只是去配置了一个 ...
- C#使用iTextSharp+ZXing.Net+FreeSpire.PDF生成和打印pdf文档
项目需求(Winform)可以批量打印某个模板,经过百度和摸索,使用iTextSharp+ZXing.Net+FreeSpire.PDF三个类库实现了生成pdf.生成条形码和打印pdf功能. 首先在项 ...
- C#6.0语言规范(三) 基本概念
应用程序启动 具有入口点的程序集称为应用程序.运行应用程序时,会创建一个新的应用程序域.应用程序的几个不同实例可以同时存在于同一台机器上,并且每个实例都有自己的应用程序域. 应用程序域通过充当应用程序 ...
- 使用 maven-assembly-plugin 打包项目
此种方式可避免resource节点对compile阶段的影响,compile阶段会读取resource节点的信息但是不会读取assembly的配置文件 1. pom文件 <?xml versio ...
- moment.js 学习笔记
一.安装 / 使用 npm install moment 注:使用版本为 2.22.2 var moment = require('moment'); moment().format(); // 20 ...