如题
<!DOCTYPE html>
注册
<br>
input::-webkit-outer-spin-button,<br>
input::-webkit-inner-spin-button {<br>
-webkit-appearance: none;<br>
}<br>
input[type="number"]{<br>
-moz-appearance: textfield;<br>
}<br>
请输入正确的手机号
下一步
$("#next").click(function(){
var mobile=$("#mobile_num").val();
var vCode=$("#validateCode").val();
if(!isCorrectPhone(mobile))
{
$("#tip_error").removeClass("hide");
$("#tip_error").html('<i></i>请输入正确的手机号!');
$("#mobile_num").focus();
return false;
}
if(mobile_num(mobile)){
if(validateCode(vCode)){
$("#register").submit();
}else{
$("#tip_error").removeClass("hide");
$("#tip_error").html('<i></i>请输入正确验证码!');
$("#validateCode").focus();
return false;
}
}else{
$("#tip_error").removeClass("hide");
$("#tip_error").html('<i></i>手机号已注册!');
$("#mobile_num").focus();
return false;
}
});
function validateCode(validateCode) {
var result="";
$.ajax({
type: 'POST',
url: "/hfive/checkStrCode",
data: {code:validateCode},
dataType: "json",
async: false,
success: function (data) {
result=data;
},
error:function (data) {
result=data;
}
});
if(result=="success"){
return true;
}
if(result=="error"){
$("#validateCode").val("");
return false;
}
}
function mobile_num(mobile_num) {
var result="";
$.ajax({
type: 'POST',
url: "/hfive/checkUserPhone",
data: {phone: mobile_num},
dataType: "json",
async: false,
success: function (data) {
result=data;
},
error:function (data) {
result=data;
}
});
if(result=="success"){
$("#mobile_num").val("");
return false;
}
if(result=="error"){
return true;
}
}
代码,这个有错?
开始是正常 的。求解答,加我qq又有红包