function userTest(){
$.ajax({
type: "post",
url: "getStatistics.jspx?branch=storage",
success: function(msg){
alert(msg);
}
});
}
以上ajax请求alert出来的是我当前页面的源代码 而不是服务器发送的数据,为什么啊 服务端没有异常抛出~
function userTest(){
$.ajax({
type: "post",
url: "getStatistics.jspx?branch=storage",
success: function(msg){
alert(msg);
}
});
}
以上ajax请求alert出来的是我当前页面的源代码 而不是服务器发送的数据,为什么啊 服务端没有异常抛出~
用Ajax发送请求,服务端不能有页面跳转,如果有跳转的话,alert打印出来的就是当前页面的源码。