AJAX+jquery+php实现无刷提交表单

前端之家收集整理的这篇文章主要介绍了AJAX+jquery+php实现无刷提交表单前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
$.get("/ajax_reg/for.PHP",{ UserName: strUserName,UserQQ: strUserQQ,UserEmail: strEmail,UserPassword: strPassword,MemberName: t,NickName: strNickName },function (result) {
//alert(result);
switch (result) {
case "-108":
AsyRequestend();
alert("不允许注册!");
break;
case "-100":
AsyRequestend();
alert("用户名已存在!");
break;
case "1":
// try {
// window.parent.UserLoginSuccussSet();
// }
// catch (e) {


// }
AsyRequestend();
alert("注册成功");
// location.href = "Index"
location.href = "/home";
break;
case "0":
AsyRequestend();
alert("注册失败");
break;
}

});


PHP处理页面:

$nowtime=date("U");
$username=$_GET[UserName];
$password=$_GET[UserPassword];
$qq=$_GET[UserQQ];
$email=$_GET[UserEmail];

$name=$_GET[NickName];


From: http://blog.csdn.net/loveifa/article/details/8530632

原文链接:https://www.f2er.com/ajax/163886.html

猜你在找的Ajax相关文章