您好我正试图在ajax
:
$.ajax({
type: "GET",
url :"${info.contextPath}/secured/contribution/employer/contributionsearch/viewNewContribution?employerCode="+code+"&contbYear="+year+"&contbMonth="+month
+"&orgId="+orgId+"&contbStatus="+status+"&employerDetailId="+employerId,
success: function(data){
alert('123'+data);
$("#newContribution").html(data);
}
});
然而,当我看到alert
的弹出窗口时,我只看到了' 123'。我的电话是错的吗?
答案 0 :(得分:2)
data: {key: value}
代替网址连接。答案 1 :(得分:1)
检查服务器的响应。如果可能,请遵循以下方法:
restart('-1')
答案 2 :(得分:0)
尝试在警报中序列化响应。
$.ajax({
type: "GET",
dataType: "json",
url :"${info.contextPath}/secured/contribution/employer/contributionsearch/viewNewContribution?employerCode="+code+"&contbYear="+year+"&contbMonth="+month +"&orgId="+orgId+"&contbStatus="+status+"&employerDetailId="+employerId,
success: function(data){
var resp = JSON.stringify(data);
alert('123'+resp);
$("#newContribution").html(resp);
}
});