register.html 3.7 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_724456_0m7h09j73i3.css">
    <script type="text/javascript" src="../assets/js/fontsize.js"></script>
    <link rel="stylesheet" href="../assets/css/weui.min.css">
    <link rel="stylesheet" href="../assets/css/style.css">
    <title>注册</title>
</head>
<body >
<div class="item_box">
    <div class="item">
        <div class="name">姓名</div>
        <div class="input_box">
            <input type="text" placeholder="请输入您的姓名" id="name">
        </div>

    </div>
    <div class="item">
        <div class="name">手机号</div>
        <div class="input_box">
            <input type="text" placeholder="请输入您的手机号" id="tel">
        </div>

    </div>
    <div class="item">
    <div class="name">验证码</div>
    <div class="input_box">
        <input type="text" placeholder="请输入短信验证码" id="code">
        <span class="register_code"><input type="button" id="btn" value="获取验证码"  class="codeinput" /></span>
    </div>
</div>
    <div class="item jobyear">
        <div class="name">工作年限</div>
        <div class="input_box">
            <input type="text" placeholder="工作年限" id="year">
            <!--<span id="year">请选择</span>-->
            <span class="iconfont icon-jiantouyou"></span>
        </div>
    </div>
    <div class="register_btn">注册</div>
</div>
<!--toast-->
<div id="toast" style="display: none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">

        <p class="weui-toast__content">已完成</p>
    </div>
</div>

<script type="text/javascript" src="../assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../assets/js/Augly_Verification.js"></script>

<script type="text/javascript" src="../assets/js/common.js"></script>
<script>
    $('.register_btn').click(function () {
        var name=$('#name').val();
        var tel=$('#tel').val();
        var code=$('#code').val();
        var year=$('#year').val();
        if(name==''){
            toast("姓名不能为空");
        }else if(tel==''){
            toast("电话号码不能为空")
        }else if(! AuglyTest_phone.test(tel)){
            toast("电话号码输入不正确")
        }else if(code == ''){
            toast("验证码不能为空")
        }else if(year==''){
        toast("工作年限不能为空")
        }else{
            alert('验证通过')
            window.location.href="login.html"
        }
    })

    $('.jobyear').click(function () {
        weui.picker([{
            label: '1岁',
            value: 1
        }, {
            label: '2岁',
            value: 2
        }, {
            label: '3岁',
            value: 3
        }, {
            label: '4岁',
            value: 4
        }, {
            label: '5岁',
            value: 5
        }], {
            onChange: function(result) {
            },
            onConfirm: function(result) {
                var year=$('#year');
                year.val(result[0].label)

            }
        });
    })
    $('#btn').click(function () {
        var tel=$('#tel').val();
        if(tel==''){
            toast("电话号码不能为空")
        }else if(! AuglyTest_phone.test(tel)){
            toast("电话号码输入不正确")
        }else{
            settime(this)
        }
    })
</script>
</body>
</html>