register.html
3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!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>