在jQuery ajax語句中,我想從服務器接收有效內容並在另一個函數中處理它。我只是遇到了函數的語法問題。jquery ajax調用問題
$.ajax({ url: 'mypgm.pgm', type:'POST', dataType: 'json', data: 'action=add' + '&techno=' + techno + '&activity=' + activity, success: ajax_callback(msg), error:function (xhr, ajaxOptions, thrownError){ alert(xhr.status); alert(thrownError); } }); } function ajax_callback(msg) { alert(msg); }
響應
{"response": { "success": "0", "message": "The Activity has been added." } }
它看起來像'mypgm.php'爲r根據你在這裏的反應,問題究竟是什麼? – 2011-05-18 23:36:10