login.html
3.0 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="yes" name="apple-touch-fullscreen">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>登录</title>
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="box">
<h1 class="login_title">欢迎登录</h1>
<div class="login_list">
<b>手机号</b>
<input type="tel" class="login_phone">
</div>
<div class="login_list">
<b>验证码</b>
<input type="number" class="login_code">
<u class="get_code">获取验证码</u>
</div>
<div class="login_tab">
<b></b>
<i>抱歉,此手机号没有权限登录</i>
</div>
<div class="btn_login">
<img src="image/btn_login.png" />
</div>
</div>
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script>
$(function () {
//获取短信验证码
var validCode=true;
$(".get_code").click (function () {
var time=60;
var code=$(this);
if (validCode) {
validCode=false;
code.addClass("msgs1");
var t=setInterval(function () {
time--;
code.html(time+"秒");
if (time==0) {
clearInterval(t);
code.html("重新获取");
validCode=true;
code.removeClass("msgs1");
}
},1000)
}
});
var Mobile_Boolean = false;
var code_Boolean = false;
$('.login_phone').blur(function(){
/*if ((/^1[34578]\d{9}$/).test($(".tel").val())){*/
if ($(".tel").val("13800000000")){
Mobile_Boolean = true;
}else {
Mobile_Boolean = false;
}
});
// code
$('.login_code').blur(function(){
if ($(".reg_password").val("123456")){
code_Boolean = true;
}else {
code_Boolean = false;
}
});
// 验证码登录
$('.btn_login').click(function(){
if( code_Boolean && Mobile_Boolean == true){
$('.login_tab').hide();
window.location.href="online_baoming.html";
}else if(code_Boolean == true){
$('.login_tab').hide();
alert("验证码错误");
}else {
$('.login_tab').show();
}
});
})
</script>
</body>
</html>