Ajax在java中怎么使用

分页ajax 应用
function fenye(cpage) {
location = “<%=path%>/list?cpage=”+cpage;
}
function qx(){
$(".ch").each(function() {
$(this).attr(“checked”,true);//false
})
}

function fx(){
		$(".ch").each(function() {
			$(this).attr("checked",!$(this).attr("checked"),true);
	})
}
function plsc(){
	var ids = "";
	$(".ch:checked").each(function() {
		ids+=","+$(this).val();
	})
	ids = ids.substring(1);
	location="plsc?ids="+ids;
}

@RequestMapping("/plsc")
public String plsc(String ids) {
System.out.println(ids);
String[] split = ids.split(",");
for (String string : split) {
zm.deleteByPrimaryKey(Integer.valueOf(string));
}
return “redirect:lista”;
}

猜你喜欢

转载自blog.csdn.net/weixin_44563494/article/details/86533809