php 如何一次性接收ajax传过来的值,ajax代码如下
$.ajax({async:false,type:"POST",url:"register/submit/",dataType:"json",data:{"email":...
$.ajax({
async:false,
type:"POST",
url:"register/submit/",
dataType:"json",
data:{"email":email,"password":password},
success:function(data){
alert("Success");
location.href = "register/active/";
},
error:function(data){
alert("Fail"+data);
return false;
}
});
ajax传过来2个值,后台php接收的话,必须用$_POST['email']和$_POST['password']接收吗?有没有一次性接收的方法? 展开
async:false,
type:"POST",
url:"register/submit/",
dataType:"json",
data:{"email":email,"password":password},
success:function(data){
alert("Success");
location.href = "register/active/";
},
error:function(data){
alert("Fail"+data);
return false;
}
});
ajax传过来2个值,后台php接收的话,必须用$_POST['email']和$_POST['password']接收吗?有没有一次性接收的方法? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询