服务条款js_随笔集

服务条款js

2023-07-25 17:38:56  浏览:249  作者:保利尼奥
<div class="deal"> <span class="sel checked" id="phoneAgreeCheck"> <input type="checkbox"> </span>我已经阅读并同意...
.i_form .deal{font-size: 14px;color: #999999;margin-top: 15px;}
.i_form .sel{width: 16px;height: 16px;display: inline-block;vertical-align: middle;background: url(../images/img_03.png) no-repeat center;background-size:contain;margin-right: 5px;border-radius:3px;}
.i_form .sel.checked{background: url(../images/img_03-1.png) no-repeat center;background-size:contain;}
.i_form .sel input{opacity: 0;}
.i_form .deal a:hover{text-decoration: underline;}
<div class="deal">
    <span class="sel checked" id="phoneAgreeCheck">
        <input type="checkbox">
    </span>我已经阅读并同意<a href="https://www.lexinchina.com/lxfwtk.html" class="c_blue">《服务条款》</a>
    <span class="fr">
        已有账号 <a href="./login.html" class="c_blue">登录&gt;</a>
    </span>
</div>
//手机号注册
function registPhone(){
    var phone=$.trim($("#phone").val());
    var regCode=$("#phoneRegCode").val();
    var phonePwd=$("#phonePwd").val();
    var phonePwd2=$("#phonePwd2").val();
    if ($("#phoneAgreeCheck").hasClass("checked") != true) {
        alert('请阅读并同意服务条款!');
        return;
    }
    if(!phone){
        alert("请输入手机号!");
        return;
    }
	if(!mobReg.test(phone)){
		alert("请输入正确手机号码!");
        return;
	}
    if(!regCode){
        alert("请输入短信验证码!");
        return;
    }
    if(!phonePwd){
        alert("请输入账号密码!");
        return;
    }
	if(!pwdReg.test(phonePwd)){
		alert("请输入6-16位包含字母和数字格式的密码!");
        return;
	}
    if(phonePwd!=phonePwd2){
        alert("两次输入密码不一致!");
        return;
    }
    $.ajax({
        url : "/dx/sys/register/registerByAimcode",
        type : "post",
        data : JSON.stringify({
            aimcode:phone,
            accid:accbigDecimal,
            password:phonePwd,
            regNum:regCode,
            ipAddress:ipAddress
        }),
        contentType : "application/json",
        async : false,
        dataType: 'json',
        success : function(data) {
            if(data.success){
                //alert("注册成功");
                window.location.href="./registerSuccess.html?accName="+phone;
            }else{
                alert(data.message);
                loadyzm();
            }
        },
        error : function() {
            alert('异常,注册异常!');
            loadyzm();
        }
    });
}


评论区

共 0 条评论
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~

【随机内容】

返回顶部