说明你后台处理的时候当前表单提交方式处理了。所以页面跳转时报404错误。给你的controller的方法加上@ResponseBody
要么你动态页有问题,要么配置错误没有返回数据,自己f12开浏览器控制台是否报错,ajax发出没有,返回什么
$.ajax({//增加下面这个配置
dataType:'json',
error:function(xhr){alert('错误\n'+xhr.responseText)},
//..原来的
})
哥们,你链接写错了
commQuery1,这个写的有问题
url是定义的一个变量,还是啥。。改成:url:commQuery1,试试
$.ajax({
url: '$!webPath/groupno.htm',
type: 'POST',
dataType: "json",
data:{"oboId":id,"gid":gid},
success: function(data) {
$("#showgroup").html(data);
},
cache: false
});
语法不对吧
你先直接把data打印出来,看有没有返回。
少了@ResponseBody?