如何让PHP返回AJAX后,继续在后台
1 回答

慕莱坞森
TA贡献1810条经验 获得超4个赞
PHP端通常是这样回应jQuery的post:
1234$response['status'] = 1;$response['message'] = 'worked';echo json_encode($response);exit();
这样在post的回调函数中就可以接收到function(data,status)的两个参数了。
1234 $.post("xxx.php",jsonData, function(data,status){ alert("Data: " + data + "\nStatus: " + status); });
- 1 回答
- 0 关注
- 568 浏览
添加回答
举报
0/150
提交
取消