日期:2014-05-16  浏览次数:20531 次

jQuery $.ajax求解释?谢谢
$.ajax({
type:"GET",
url:"fax/deleteFax.jsp?"+ids+"&location_id="+location_ids+"&lft_"+times.getTime(),
async:true,
success:function(data){

},
error:function(){
alert("出错");
}
});
为什么出错呢?求解释,请求deleteFax.jsp得不到响应

------解决方案--------------------
1.async:true//默认的就是true 表示异步.默认的也是GET请求
2.确认你的url是不是正确的,少了/还是../
3.服务器端返回的是否正确
4.error方法是有3个参数的 分别看一下具体是什么错误
------解决方案--------------------
探讨
引用:

1.async:true//默认的就是true 表示异步.默认的也是GET请求
2.确认你的url是不是正确的,少了/还是../
3.服务器端返回的是否正确
4.error方法是有3个参数的 分别看一下具体是什么错误
error的用法能说的具体点吗 ?麻烦了

------解决方案--------------------
fax/deleteFax.jsp?"+ids+"&location_id="+location_ids
假设ids=aaa,location_ids=bbb那么url拼完以后就是
fax/deleteFax.jsp?aa&location_id=bbb了,这个地址正确?
"?"号后面是不是应该有参数 类似fax/deleteFax.jsp?ids="+ids+"&location_id="+location_ids