Ajax本地没问题,上传服务器就出现问题了 20
varrequest=newXMLHttpRequest();request.open("POST","../reg/handlereg.php");varbdnr="n...
var request=new XMLHttpRequest();
request.open("POST","../reg/handlereg.php");
var bdnr="name="+document.getElementById('zc_yhm').value
+ "&pass="+document.getElementById("pass").value
+ "&mail="+document.getElementById("zc_yx").value
+ "&security="+document.getElementById("zc_mb").value
+ "&answer="+document.getElementById("zc_da").value
+"&sfks="+sfks
+ "&but="+document.getElementById("but").value;
request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
request.send(bdnr);
request.onreadystatechange=function(){
if (request.readyState===4){
if (request.status===200){
document.getElementById("text").innerHTML=request.responseText;
}else{
alert("注册失败!"+request.status);
}
} 展开
request.open("POST","../reg/handlereg.php");
var bdnr="name="+document.getElementById('zc_yhm').value
+ "&pass="+document.getElementById("pass").value
+ "&mail="+document.getElementById("zc_yx").value
+ "&security="+document.getElementById("zc_mb").value
+ "&answer="+document.getElementById("zc_da").value
+"&sfks="+sfks
+ "&but="+document.getElementById("but").value;
request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
request.send(bdnr);
request.onreadystatechange=function(){
if (request.readyState===4){
if (request.status===200){
document.getElementById("text").innerHTML=request.responseText;
}else{
alert("注册失败!"+request.status);
}
} 展开
1个回答
2016-04-08
展开全部
你好 如果你的代码在本地没有任何情况 在服务器端不正常应该是服务器的问题 请尝试把缓存删掉或重新部署服务器内容
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询