無法弄清楚,爲什麼這個jquery函數總是返回一個錯誤而不是成功。jquery ajax調用返回錯誤
所以我希望得到一些反饋;-)
在此先感謝!
巴斯
$.ajax({
type : 'POST',
dataType: 'json',
url : '/ajax_push_order_status_request.php',
data: dataString,
success:function (data) {
$('.success').fadeIn(1000);
$(".success").append(data);
},
error: function (data) {
alert("ERROR: " + data);
$('.error1').fadeIn(1000);
}
});
我的PHP腳本返回:
{"result":true}
什麼是錯誤? – thebjorn
在這裏發佈您的PHP代碼。 –
如果你在你的瀏覽器去:http://www.zwembad.eu/ajax_push_order_status_request.php你可以看到它正在返回「結果」:true,但在ajax調用你正在得到某種類型的安全不允許錯誤 – w3bMak3r