Phone number, verification code

Source: Internet
Author: User

//Get Phone Verification Code
var phone = $ (' #phone ');
var Mobilereg =/^ (13[0-9]|14[0-9]|15[0-9]|17[0-9]|18[0-9]) \d{8}$/;
var getcode=$ (' #getCode ');
Getcode.on (' click ', function () {
if (allowget) {
if (!mobilereg.test (Phone.val ())) {
Alert ('Please enter the correct format of the phone number~ ');
Return
}
UpdateTime ();
$.getjson ('/user.d?m=regetvcode_lottery&phone= ' + phone.val () + ' &times=first ', function (data) {
var status = Data.root.status;
var message = Data.root.message;
alert (message);
if (Status!== ' 100 ') {
Clearinterval (timer);
Getcode.val ('Get Verification Code'). Removeclass (' Getingcode ');
Timecount = 60;
Allowget = true;
}
});
} else {
Return
}
});
//Submit Verification Code
var loginbtn = $ (' #loginBtn ');
var Inputcode = $ (' #inputCode ');
Loginbtn.on (' click ', function () {
if (!phone.val (). Trim ()) {
Alert ('The phone number cannot be empty~ ');
Return
}
if (!inputcode.val (). Trim ()) {
Alert ('The verification code cannot be empty~ ');
Return
}
Login.hide (). CSS (transinit);
Floatalert.fadeout (300);
$.getjson ('/activity.d?m=checkvcode ', {checkCode:inputCode.val (), Phone:phone.val ()}, function (data) {
var checkstatus = Data.root.status;
alert (' login succeeded Window.location.href = '/HUODONGAC.D?CLASS=CHAIHONGBAOHC &m=index ';
Alert (' Captcha error, re-enter Showlogin ();

});

Phone number, verification code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.