前台:
$(function() {//点击播放按钮执行的事件
$("#button").click(function(e) {
alert("kaishi chuanzhi ");
var ids = [];
var i = map.size();
var allValue = map.values();
for (i; i < allValue.length; i++) {
ids.push(allValue[i]);
}
// window.href="${ctx}/sitesmanage/video/form?id=${type.id}"
// window.location.href = "videShowChilds.do?id=" + id;
$.ajax({
type: 'POST',
url:'${ctx}/sitesmanage/video/videoPlay',
dataType : "json",
data:{titles:ids},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
},
success: function (data) {
alert("ok");
}
});
});
});
后台:
@RequestMapping(value = "videoPlays")
public String videoPlays(HttpServletRequest request,
HttpServletResponse response, ModelMap model,@RequestParam(value = "titles[]") String[] titles) {
System.out.println(titles.length+"@@@");
//return "modules/sitesmanage/videoPlayForm";
return null;
}