bootstrap 左右框多项选择示例
bootstrap 左右选择框,左边框是未选项,右边框是已选择项,提供单选,全选按钮,以及取消已选项,如图示:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5IAAAENCAIAAADyvM36AAAgAElEQVR4nO3dTW/c1t338euV+EVkgBsFlIWAAE4hFNCtVQC1uIGiKWo0q8BZOQtvChRGFs3CQBbjK2gb97rlhRugaYxpoxYu6iiyKyuxNbYUK5YlWZqRrAdLI1MPM+Sca3Fihj7k4aOGw8P5fkD8MeJwKMoBqF/+OjznvwQAAABQeP/V7wsAAAAAohFbAQAAYABiKwAAAAxAbAUAAIABiK0AAAAwQERsbbfbzWZzZWXlMQAAANAbKysrzWaz3W6njK3tdvvp06cHBwcvXrywLItKpVKpVCqVSu1RPTg4ePLkSUhy1cbWbrfbaDTIrFQqlUqlUqnUfOrBwUGj0eh2u8liq+M4jx8/fgEAAADkZWVlxXGcZLHVtm1iKwAAAPL0+PFj27aTxdZOp/P48WM5SIBKpVKpVCqVSs2hpo+tRbh6KpVKpVKpVOqA1MePH3c6nTSxtdVqHRwcUKlUKpVKpVKpOdT0sbUIV0+lUqlUKpVKHZCaqdsKAAAA5IPYCgAAAAOkj637+/utVotKpVKpVCqVSs2hZuq29v3qqVQqlUqlUqkDUjN1WwEAAIB8ZIqte3t7GWulUkm0P93Z3FqpVCL3UKlUKpVKpVILWNPH1r2EZEBUXnt3Bh5cCRJycOC3CzlSdwEAAAAolPxi616S1KgLoInCaJaACwAAgEJJH1ufP3++t7eXqFYqFfla10OVx3i5x7tVd07vZ3Xves8WeAyVSqVSqVQqtZg1U7c13Xf1psbAJBq4P2ZmjfN9/TmV5EqlUqlUKpVa8Jqp25qdzIuR++WXbic1/nm8B7gnSXcGAAAA9FFOsdX75/vAEQJKJHVf+6Oq/8iYZ1POGXgkAAAAiil9bN1NrlKp+L9UdrpvBR4ceIzuDCF7dK8BAABQTIWLrW4H1L/Hn2UDD9AdSWwFAAAwV/rYurOzs7u7m6hWKhX/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AGIrQAAADAAsRUAAAAGILYCAADAAMRWAAAAGIDYCgAAAAMQWwEAAGAAYisAAAAMQGwFAACAAYitAAAAMACxFQAAAAYgtgIAAMAAxFYAAAAYgNgKAAAAAxBbAQAAYABiKwAAAAyQMrY+efLEcZyeXRUAAADwg06ns7KyYtt24Lva2Grb9vr6+u7ubs8uDAAAAPjB7u7u+vp64tjqOI5lWU+ePNnb29O1agEAAIDsOp3O7u7ukydPLMvS/bVfG1u73a5t25Zlra2tLS8vPwYAAAB6Y3l5eW1tzbIs27a73W6y2Oom15OTk2MAAACgl05OTkIya0RslcnVcRzbtm3b7gAAAACnTUZNx3FCMmt0bAUAAACKgNgKAAAAAxBbAQAAYABiKwAAAAxAbAUAAIABiK0AAAAwALEVAAAABiC2AgAAwADEVgAAABjgfwHpAu7otJaWwAAAAABJRU5ErkJggg==" alt="" width="463" height="136" />
jsp中页面代码:
<div class="panel-heading">选择省份</div>
<fieldset>
<table class="table table-bordered dchannel-table">
<tbody>
<tr class="item-default">
<td align="right" style="width: 50%;">
<select id="sel_all_area" multiple="multiple" size="10" style="width:100%;">
<c:forEach items="${unselectedAreas}" var="area" varStatus="loop">
<option value="${area.code}">${area.name}(${area.code})</option>
</c:forEach>
</select>
</td>
<td style="width: 50px;" valign="middle">
<button type="button" class="btn btn-default btn-small" id="btn_select_all_area"><span class="glyphicon glyphicon-forward"></span></button>
<button type="button" class="btn btn-default btn-small" id="btn_choose_selected_area"><span class="glyphicon glyphicon-chevron-right"></span></button>
<button type="button" class="btn btn-default btn-small" id="btn_remove_selected_area"><span class="glyphicon glyphicon-chevron-left"></span></button>
<button type="button" class="btn btn-default btn-small" id="btn_remove_all_area"><span class="glyphicon glyphicon-backward"></span></button>
</td>
<td style="width: 50%;">
<select id="sel_selected_areas" multiple="multiple" size="10" style="width:100%;">
<c:forEach items="${selectedAreas}" var="area" varStatus="loop">
<option value="${area.code}">${area.name}(${area.code})</option>
</c:forEach>
</select>
</td>
</tr>
</tbody>
</table>
</fieldset>
其中:${unselectedAreas}是从服务端获取的未选择的选项内容,${selectedAreas}为从服务端获取的已选择的选项,在列表中展示出来。
jquery 代码:
//处理地区的选择
var j_all_area = $("#sel_all_area"), j_selected_areas = $("#sel_selected_areas");
$("#btn_select_all_area").click(function(){
j_all_area.find("option").each(function(){
$(this).appendTo(j_selected_areas);
});
return false;
});
$("#btn_choose_selected_area").click(function(){ j_all_area.find("option:selected").each(function(){
$(this).appendTo(j_selected_areas);
});
return false;
});
$("#btn_remove_selected_area").click(function(){
j_selected_areas.find("option:selected").each(function(){
$(this).appendTo(j_all_area);
});
return false;
});
$("#btn_remove_all_area").click(function(){
j_selected_areas.find("option").each(function(){
$(this).appendTo(j_all_area);
});
j_selected_areas.find("option").each(function(){
$(this).appendTo(j_all_area);
});
return false;
});
j_all_area.find("option").on("dblclick", function(){
if ($(this).closest("select").is(j_all_area)) {
$("#btn_choose_selected_area").click();
}
else {
$("#btn_remove_selected_area").click();
} return false;
});
j_selected_areas.find("option").on("dblclick", function(){
if ($(this).closest("select").is(j_all_area)) {
$("#btn_choose_selected_area").click();
}
else {
$("#btn_remove_selected_area").click();
} return false;
});
提交的时候要获取已选择的选项,可以使用下面的jQuery代码:
var selectedAreaArray = [];
$("#sel_selected_areas option").each(function(i){
selectedAreaArray[i] = $(this).val();
});
最后记得要引用相关的js和css文件:
bootstrap.css
jQuery.js
bootstrap.js
(完事) 若有不妥,欢迎留言,共同探讨.
bootstrap 左右框多项选择示例的更多相关文章
- php一些单选、复选框的默认选择方法(示例)
转载 http://www.php.cn/php-weizijiaocheng-360029.html 一. radio和checkbox及php select默认选择的实现代码 1.radio单选框 ...
- Android中的AlertDialog使用示例四(多项选择确定对话框)
在Android开发中,我们经常会需要在Android界面上弹出一些对话框,比如询问用户或者让用户选择.这些功能我们叫它Android Dialog对话框,AlertDialog实现方法为建造者模式. ...
- 使用showOptionDialog显示多项选择框
-----------------siwuxie095 工程名:TestJOptionPane 包名:com.siwuxie095.showdi ...
- 使用bootstrap模态框实现浮动层
authour: 陈博益 updatetime: 2015-04-22 06:52:15 friendly link: http://v3.bootcss.com/javascript/#modals ...
- Bootstrap 模态框
Bootstrap 模态框(也可以说的弹出层) 最近在尝试使用bootstrap的模态框 使用模态框主要要引入一下几个js和css: bootstrap.css jquery.1.9.1.js(这个可 ...
- Bootstrap 模态框(也可以说的弹出层)
最近在尝试使用bootstrap的模态框 使用模态框主要要引入一下几个js和css: bootstrap.css jquery.1.9.1.js(这个可以灵活选择) bootstrap.js html ...
- 基于bootstrap模态框的日期选择器
近来由于工作需求,以bootstrap模态框+DIV+CSS+JS做了一个适用于移动端的日期选择器,能够满足多样的需求,目前处于第一个版本,后续可能会继续更新.废话不多说,直接进入制作过程. 首先,需 ...
- 阅读《Android 从入门到精通》(9)——多项选择
多项选择(CheckBox) CheckBox 类是 Button 的子类,层次关系例如以下: android.widget.Button android.widget.CompoundButton ...
- 模块:(日期选择)jquery、bootstrap实现日期下拉选择+bootstrap jquery UI自带动画的日期选择器
一:jquery.bootstrap实现日期下拉选择 点击文本框弹出窗口 弹窗显示日期时间选择下拉 年份取当前年份的前后各5年 天数随年份和月份的变化而变化 点击保存,文本框中显示选中的日期 代码部分 ...
随机推荐
- 微信小程序之如何注册微信小程序
所有文章均是CSDN博客所看,已按照作者要求,注明出处了,感谢作者的整理! 博客文章地址:http://blog.csdn.net/michael_ouyang/article/details/546 ...
- 【BZOJ2115】[Wc2011] Xor 高斯消元求线性基+DFS
[BZOJ2115][Wc2011] Xor Description Input 第一行包含两个整数N和 M, 表示该无向图中点的数目与边的数目. 接下来M 行描述 M 条边,每行三个整数Si,Ti ...
- <%%>与<scriptrunat=server>,<%=%>与<%#%>的区别(转)
这些东西都是asp.net前台页面与后台代码交互过程中经常使用的,它们之间有的非常相似,又有一些不同.对比学习下,看看他们之间的联系与区别. 首先看<%%>与<scriptrunat ...
- 九度OJ 1338:角斗士 (递归、DP)
时间限制:3 秒 内存限制:32 兆 特殊判题:否 提交:213 解决:66 题目描述: 角斗士是古罗马奴隶社会的一种特殊身份的奴隶,他们的职责是在角斗场上进行殊死搏斗,为了人们提供野蛮的娱乐.他们的 ...
- 我的Android进阶之旅------>Android无第三方Jar包的源代报错:The current class path entry belongs to container ...的解决方法
今天使用第三方Jar包afinal.jar时候,想看一下源代码,无法看 然后像添加jar对应的源码包,也无法添加相应的源代码,报错如下:The current class path entry bel ...
- wechat JS-SKD (getLoaction) 定位显示百度map
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name ...
- 使VS自动生成代码注释
1.注释模板位置C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplatesCache 里面有各种脚本的模板 2.找到 ...
- js完美实现table分页
// JavaScript Document /** * js分页类 * @param iAbsolute 每页显示记录数 * @param sTableId 分页表格属性ID值,为String * ...
- SS中的三种样式来源:创作人员、读者和用户代理
CSS中的样式一共有三种来源:创作人员.读者和用户代理,来源的不同会影响到样式的层叠方式,很多第一次学习CSS的朋友,对这三种来源可能会存在一些困惑,下面我写一下自己的理解,若有错误的地方还请指正. ...
- Linux LVM管理
创建和管理LVM 要创建一个LVM系统,一般需要经过以下步骤: 1. 创建分区 fdisk /dev/sdb 使用分区工具(如:fdisk等)创建LVM分区,方法和创建其他一般分区的方式是一样的,区别 ...