bootstrap multiselect 多选功能实现方法
官方教程
http://www.kuitao8.com/demo/20140224/1/bootstrap-multiselect-master/index.html
使用方法:
第一步引用样式以及相关JS
第二步构造Selection(注意需要设置multiple属性,否则依然是单选模式,multiple="multiple")
Cheese Tomatoes Mozzarella Mushrooms Pepperoni Onions
第三步初始化插件:
$(document).ready(function(){ $('.multiselect').multiselect(); });
常用方法:
select $('#cid').multiselect('select',arr[i]);给控件设置选中项
获取值
$('#cid').val();获取控件所有的选中值
以上所述是小编给大家介绍的bootstrapmultiselect多选功能实现方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对毛票票网站的支持!