未定義的要求:繼續使用Ajax代碼獲得與阿賈克斯
$.ajaxSetup({
url: "last-id-test.php",
type: "POST",
});
$.ajax({
data: {theinfo: 'forminfo'},
success: function(data) {alert(data)},
error: function (XMLHttpRequest, textStatus, errorThrown){alert('Error submitting request.')}
});
和最後-ID-test.php的的那麼簡單的PHP:
$showme = $_GET['theinfo'];
我總是得到錯誤「未定義指數 - theinfo '...
我看不到我的錯誤?
而在PHP中使用GET你在jQuery代碼使用POST ... – HamZa 2013-02-14 23:17:50
好第一關你使用'POST'... – 2013-02-14 23:17:58