【发布时间】:2012-04-01 07:09:17
【问题描述】:
toDistance.php 调用这个函数后会跑吗?似乎 toDistance.php 没有被调用。谢谢
function myAjax(volunteerDist, jid){
$.ajax({
type:'POST',
url: 'toDistance.php',
data : ({
distance:volunteerDist,
id:jid
}),
success: function(){
alert('worked');
},
error :function(jqXHR, textStatus, errorThrown) {
alert(errorThrown);
},
complete : function(){
alert('thanks');
}
});
【问题讨论】:
-
@JoeTuskan 在我的 toDistance.php 中,我有回音,但它没有回音,怎么会?
-
因为它是 ajax。不是页面刷新。
-
@JoeTuskan 好吧,现在,volunteerDist 和 jid 是数组,我如何在我的 toDistance.php 中 $_GET 呢?
-
在发布问题之前,您需要做更多的“家庭作业”。 您在 firebug 中看到了什么? stackoverflow 不是“字谜游戏”之类的地方
-
对不起..我不知道萤火虫..它今天才知道这个并阅读了这个 $_GET
标签: javascript ajax