这是我目前的代码:
$.ajax({
type: "POST"
, url: "first-script.php"
, data: {
dataPoint: dataValue
}
, success: function (dataPath) {
// Do stuff with dataPath
// Call another PHP script once done.
}
});
我被困在Call another PHP script once done.
部分。我怎样才能做到这一点?有可能吗?还有其他方法吗?
答案 0 :(得分:1)
使用之前的ajax请求成功回调嵌套ajax:
$.ajax({
type: "POST",
url: "first-script.php",
data: {
dataPoint: dataValue
},
success: function (dataPath) {
//Another request
$.ajax({});
});