想象我運行此:如何從ajax/jquery獲取響應文本?
$.ajax({
type: 'POST',
url: '/ajax/watch.php',
data: {'watch':'aukcia', 'id':aukciaID},
complete: function(responseText){
alert(responseText);
}
});
裏面/ajax/watch.php,讓我們說我有這樣的:
echo 'this is what I want';
以及警報(responseText的)返回:
[object Object]
而不是我需要的文本字符串。 請幫忙嗎?
確保你返回純文本來自你的PHP文件。 – JohnP 2011-03-20 05:17:20
100%確定我是:/ – 2011-03-20 05:19:08