$("#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 多选下拉框相关推荐

  1. jquery easyui 多选下拉框的实现

    为什么80%的码农都做不了架构师?>>>    jquery easyui 多选下拉框的实现 修改官方提供的demo实例,本来是单选的,让她编程多选,完成了勾选和去勾选的所有功能. ...

  2. multiselect多选下拉框

    具体实现 <input type="hidden" id="q_dueDay" name="q_dueDay" value=" ...

  3. html css 多选下拉框,jQuery多选下拉框插件

    jquery.multi-select.js是一款jQuery多选下拉框插件.该插件可以将select元素转换为带checkbox的多选下拉框,非常实用. 使用方法 在页面中引入下面的文件. lt;l ...

  4. jquery --- 多选下拉框的移动(穿梭框)

    效果如下: 几个注意地方: 1.多选下拉框需要添加 multiple 2.获取选中的元素KaTeX parse error: Expected 'EOF', got '#' at position 3 ...

  5. 【js】复选框,复选下拉框,文本框勾连

    [js]对常见事件的一个总结 ps: 内容涉及(kendo Ui, jQuery) 如下图所示:要求实现功能点 (1)用户名(复选下拉框,可选择多个)和用户名(文本输入框)相勾连 复选下拉框改变,文本 ...

  6. layui多选下拉框

    HTML代码 <select class="param_belong" multiple="multiple" lay-filter="sele ...

  7. HTML多选mysql,html多选下拉框 | 学步园

    一个jquery ui,实现html的多选下拉框,在下拉里面加checkbox,不改变页面的提交特性,只是动态的改变select选中的多选数据. jsp页面例子: pageEncoding=" ...

  8. bootstrap-multiselect.js多选下拉框初始化时默认选中初始值

    bootstrap-multiselect.js多选下拉框默认值设置 一.案例数据格式  二.HTML代码 <select id="msgRoles" multiple=&q ...

  9. Angular实现虚拟滚动多选下拉框笔记

    要求: 实现一个angular多选下拉框组件,当有超过2000个选项时,滑动/挑选/全选均不卡. 正篇: 为了方便,这里不考虑扩展性,所以规定下拉框展开只显示7行数据,行高27px 约定:input为 ...

最新文章

  1. 怎么通过MQTT查看数据是否上云端_干货 | 设备快速上云,轻松搞定设备与云端通信...
  2. python小乌龟消除_悄悄告诉你,Python 里面有一只小乌龟
  3. python中数据分析的流程为-利用python进行数据分析——histogram
  4. C#-WinForm-无边框窗体的移动和阴影-API
  5. java监听器模式使用场景_常用监听器及其应用场景
  6. pycharm如何标记代码?创建代码标签?创建数字标签?收藏代码标签
  7. Windows10环境下使用Anaconda安装tensorflow环境及keras环境
  8. 软件工厂是否真的可能存在?
  9. Linux创建守护进程
  10. 一文掌握 Linux 性能分析之网络篇(续)
  11. hive 直接访问mysql_hive 直接插入mysql
  12. php修改sessiob时间_php中session过期时间设置
  13. 【ARM学习笔记】问题Processor ARM920T raised an exception.Cause:Undefined instruction的解决方法
  14. 上翻图片轮播特效代码 缓存应用
  15. C++基础知识(7)
  16. 个人web前段学习心得
  17. Python批量重命名图像
  18. MYSQL 基础篇(补)
  19. Recon-ng的简单使用(recon-ng v5.1.1)
  20. 大数据平台测试目标与测试指标

热门文章

  1. iPhone开发教程 UI基础课程(58课时)
  2. 360分拆计划生变,临时剥离四大业务
  3. openresty 搭建
  4. JavaScript Ajax与Comet——“其他跨域技术”的注意要点
  5. asp 图片上传源码 【亲测】
  6. 微信支付JSAPI掉不起来支付按钮是什么原因?(原创)
  7. Gerrit配置--用户配置
  8. 直播平台实现视频监控
  9. 《敏捷可执行需求说明 Scrum提炼及实现技术》—— 3.5 小结
  10. WebSocket(伍) 断开连接