easyUI批量删除,向后台传数组
来源:互联网 发布:哪个软件直播笑傲江湖 编辑:程序博客网 时间:2024/04/30 09:14
easyUI做批量删除时,向后台传送数组
前台代码:
<table id="dg" class="easyui-datagrid" title="分行信息" style="width:1200px;height:450px"
data-options="
rownumbers:true,
singleSelect:true,
url:'${ctx}/branchAjax',
method:'get',
autoRowHeight:false,
pagination:true,
pageSize:10,
toolbar:'#tb'">
<thead>
<tr>
<th data-options="field:'id',checkbox:true">ID</th>
<th data-options="field:'branch_code',width:100">分行编码</th>
<th data-options="field:'branch_name',width:80,align:'right'">分行名称</th>
<th data-options="field:'simple_name',width:80,align:'right'">分行简称</th>
<th data-options="field:'english_name',width:220">外文名称</th>
<th data-options="field:'district_code',width:220">地区编码</th>
<th data-options="field:'create_date',width:220">成立日期</th>
<th data-options="field:'branch_state',width:60,align:'center'">状态</th>
</tr>
</thead>
</table>
js代码:
function deleteDate(){
var rows = $('#dg').datagrid('getSelections');var ids = new Array();
for(var i=0; i<rows.length; i++){
ids.push(rows[i].id);
}
$.ajax({
type: "POST",
url: "${ctx}/deleteBranch",
data: { "ids": ids},
dataType: "json",
traditional: true,
success: function(data){
window.location.reload();
},
error : function() {
alert("异常!");
}
});
}
后台接收代码:
public void deleteBranch(int[] ids, HttpServletRequest request) {
for (int i : ids) {
tBrenchService.deleteBranch(i);
}
}
- easyUI批量删除,向后台传数组
- jquery easyUI之如何向后台传数组参数
- easyui datagrid批量编辑后向后台post数据
- easyui datagrid批量编辑向后台保存数据。
- ajax向后台传数组
- jquery 向后台传数组 JAVA接收
- springMVC 前台向后台传数组
- jQuery.ajax向后台传数组
- jquery AJAX 向后台传数组
- ajax向后台springmvc传对象数组
- easyui将前端数据表格传向后台接受
- EasyUI向后台发送page和rows
- ajax 异步请求向后台传数组,后台无法接收
- 使用easyui中的datagrid 分页时,向后台传参数page 和rows
- Struts中从前台向后台action传数组的方法
- javascript向后台传送数组参数
- JQuery Ajax向后台传递数组
- ajax向后台发送数组数据
- 谈谈Android里的Context的使用!
- OC篇--数据类型
- u-boot-2016.05移植:(5)、支持DM9000网卡
- 使用JDBC对数据库进行CRUD
- wireshark怎么抓包、wireshark抓包详细图文教程
- easyUI批量删除,向后台传数组
- 15. 3Sum
- 欢迎使用CSDN-markdown编辑器
- typeof和instanceof用法
- C++ String类实现以及初始化原理和析构顺序
- spring @Scheduled注解使用误区,强烈建议同胞们看。
- ARM LINUX 扩展串口
- 13个应用案例,讲述最真实的大数据故事!
- 网上面试题(二)