var ids = [];
var rows=$("#tt").datagrid("getSelections");
for(var i=0; i<rows.length; i++){
ids.push(rows[i].phonenumber);
}
$.ajax({
async : false,
cache : false,
traditional: true,//防止深度序列化
type : 'POST',
data : {
ids:ids
},
url : "personalInfoController.do?SendMSG",// 请求的action路径
error : function() {// 请求失败处理函数
},
success : function(data) {
var d = $.parseJSON(data);
if (d.success) {
var msg = d.msg;
tip(msg);
}
}
});
@RequestMapping(value = "/add", method = RequestMethod.POST)
public @ResponseBody Message add(HttpServletRequest request, String messageTitle, String messageContent, Long ids[]){ return Message.success("新增消息成功");
}