jquery multiSelect 多选下拉框
$("#id").multiSelect({ oneOrMoreSelected: '*',selectAll:false,noneSelected:'默认显示' });
Usage: $('#id').multiSelect( options, callback )
Options: selectAll - whether or not to display the Select All option; true/false, default = true
selectAllText - text to display for selecting/unselecting all options simultaneously
noneSelected - text to display when there are no selected items in the list
oneOrMoreSelected - text to display when there are one or more selected items in the list
(note: you can use % as a placeholder for the number of items selected).
Use * to show a comma separated list of all selected; default = '% selected'
optGroupSelectable - whether or not optgroups are selectable if you use them; true/false, default = false
listHeight - the max height of the droptdown options
// Update the textbox with the total number of selected items, and determine select all
$("#id").updateSelected()
// Update the dropdown options
$("#id").multiSelectOptionsUpdate()
// Hide the dropdown
$("#id").multiSelectOptionsHide()
// Show the dropdown
$("#id").multiSelectOptionsShow()
// get a coma-delimited list of selected values
$("#id").selectedValuesString
//使用javascript 设置多选框的默认选中项。
$("#id").attr("value","");//清空选中项。
var ids='1,3,6';//设置选中框ID。
var id_Ojbect=(ids).split(",");//分割为Ojbect数组。
var count=$("#id option").length;//获取下拉框的长度。
for(var c=0;c<id_Ojbect.length;c++){
for(var c_i=0;c_i<count;c_i++)
{
if($("#id").get(0).options[c_i].text == id_Ojbect[c])
{
$("#id").get(0).options[c_i].selected = true;//设置为选中。
}
}
}
//后台获取选中的值
string mes=Request["id[]"].ToString();
//使用
<select id="MySelectBox" multiple="multiple" name="MySelectBox">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
$(function()
{$("#bcGroups").multiSelect({selectAll : true,noneSelected : '请选择',oneOrMoreSelected : '*'});
});
jquery multiSelect 多选下拉框相关推荐
- jquery easyui 多选下拉框的实现
为什么80%的码农都做不了架构师?>>> jquery easyui 多选下拉框的实现 修改官方提供的demo实例,本来是单选的,让她编程多选,完成了勾选和去勾选的所有功能. ...
- multiselect多选下拉框
具体实现 <input type="hidden" id="q_dueDay" name="q_dueDay" value=" ...
- html css 多选下拉框,jQuery多选下拉框插件
jquery.multi-select.js是一款jQuery多选下拉框插件.该插件可以将select元素转换为带checkbox的多选下拉框,非常实用. 使用方法 在页面中引入下面的文件. lt;l ...
- jquery --- 多选下拉框的移动(穿梭框)
效果如下: 几个注意地方: 1.多选下拉框需要添加 multiple 2.获取选中的元素KaTeX parse error: Expected 'EOF', got '#' at position 3 ...
- 【js】复选框,复选下拉框,文本框勾连
[js]对常见事件的一个总结 ps: 内容涉及(kendo Ui, jQuery) 如下图所示:要求实现功能点 (1)用户名(复选下拉框,可选择多个)和用户名(文本输入框)相勾连 复选下拉框改变,文本 ...
- layui多选下拉框
HTML代码 <select class="param_belong" multiple="multiple" lay-filter="sele ...
- HTML多选mysql,html多选下拉框 | 学步园
一个jquery ui,实现html的多选下拉框,在下拉里面加checkbox,不改变页面的提交特性,只是动态的改变select选中的多选数据. jsp页面例子: pageEncoding=" ...
- bootstrap-multiselect.js多选下拉框初始化时默认选中初始值
bootstrap-multiselect.js多选下拉框默认值设置 一.案例数据格式 二.HTML代码 <select id="msgRoles" multiple=&q ...
- Angular实现虚拟滚动多选下拉框笔记
要求: 实现一个angular多选下拉框组件,当有超过2000个选项时,滑动/挑选/全选均不卡. 正篇: 为了方便,这里不考虑扩展性,所以规定下拉框展开只显示7行数据,行高27px 约定:input为 ...
最新文章
- 怎么通过MQTT查看数据是否上云端_干货 | 设备快速上云,轻松搞定设备与云端通信...
- python小乌龟消除_悄悄告诉你,Python 里面有一只小乌龟
- python中数据分析的流程为-利用python进行数据分析——histogram
- C#-WinForm-无边框窗体的移动和阴影-API
- java监听器模式使用场景_常用监听器及其应用场景
- pycharm如何标记代码?创建代码标签?创建数字标签?收藏代码标签
- Windows10环境下使用Anaconda安装tensorflow环境及keras环境
- 软件工厂是否真的可能存在?
- Linux创建守护进程
- 一文掌握 Linux 性能分析之网络篇(续)
- hive 直接访问mysql_hive 直接插入mysql
- php修改sessiob时间_php中session过期时间设置
- 【ARM学习笔记】问题Processor ARM920T raised an exception.Cause:Undefined instruction的解决方法
- 上翻图片轮播特效代码 缓存应用
- C++基础知识(7)
- 个人web前段学习心得
- Python批量重命名图像
- MYSQL 基础篇(补)
- Recon-ng的简单使用(recon-ng v5.1.1)
- 大数据平台测试目标与测试指标