}else {
Alert ("Verification code sent, please pay attention to check");
Time ();//Call Verification code Countdown
document.getElementById (' Iputcode '). SetAttribute (' class ', result);//Let the element be added CALSS
}
/**
* Show Countdown time after clicking get Verification code
*/
var wait = 60;//definition SMS Send countdown time
function Time () {
Ocument.getelementbyid (' obtain '). Disabled = false; Allow the button to click
if (wait = = 0) {
document.getElementById (' obtain '). RemoveAttribute ("Disabled"); The control button can be clicked
document.getElementById (' obtain '). Value = "Get Verification Code";
document.getElementById (' obtain '). Style.color = ' #2C8FFF ';
wait = 60; Restore Countdown
}else{
document.getElementById (' obtain '). SetAttribute ("Disabled", true);//control button not clickable
document.getElementById (' obtain '). Value = "Resend (" + Wait + ")";
document.getElementById (' obtain '). Style.color = ' #C0BBBB ';
wait--;
SetTimeout (' Time () ', 1000)//Cyclic call
}
}
/**
* Verify that the verification code is correct
*/
function Verify () {
var yzm = document.getElementById (' Iputcode '). Value; Obtain the verification code that the registered user fills in
var yzmtwo = document.getElementById (' Iputcode '). ClassName; Verification code sent by the system
if (Yzm = = "") {
Alert ("Verification code cannot be empty");
return false;
}else if (yzm! = yzmtwo) {
Alert ("Verification code error, please re-enter!") ");
Eturn false;
}
return true;
}
Click Next to verify that the verification code is correct
$ (function () {
Next
$ (' #nextStep '). Click (function () {
var ipone = Isipone ($ (' #loginPhone '). Val ());//Mobile number verification
var loginphone = document.getElementById (' Loginphone '). value;//get the user's mobile number
if (ipone! = True) {
Return
}
var yzm = verify ();//call validation method here
if (Yzm! = True) {
Return
}
if (Ipone = = True && Yzm = = True) {
Next Jump Set Password page
window.open (' resetpassword.html?iphone= ' +loginphone)
}
})
})
Phone number to obtain the verification code, verify that the verification code is correct