-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (62 loc) · 2.2 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Login</title>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/index.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<div class="row">
<form action="profile_page.html" method="post" name="fv" id="form" class="form-control">
<div>
<h4>Username</h4>
<input type="text" class="form-control" name="uname" id="uname">
<span></span>
</div>
<div>
<h4>Password</h4>
<input type="password" class="form-control" name="pass" id="pass">
<span></span>
</div>
<button class="btn btn-primary reset" type="button" onclick="clEar()">Reset</button>
<button class="btn btn-primary sub" id="sb" type="submit">Login</button>
</form>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.validate.js"></script>
<script>
$(function(){
$("#form").validate({
rules:{
uname:{
required:true
},
pass:{
required:true
}
},
messages:{
uname:{
required:"type username"
},
pass:{
required:"type password"
}
}
});
})
function clEar(){
if (document.fv.uname.value != "" && document.fv.pass.value != "") {
document.fv.uname.value = "";
document.fv.pass.value = "";
}
}
</script>
</body>
</html>