forked from starzou/front-end-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BootstrapFormTemplate.html
104 lines (96 loc) · 4.82 KB
/
BootstrapFormTemplate.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
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
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Form Template</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="app/lib/bootstrap/css/bootstrap.css"/>
</head>
<body>
<div class="container">
<h1 class="text-center text-danger">Form 示例</h1>
<form role="form" class="form-horizontal" action="javascript:alert('验证成功,可以提交.');" method="post">
<div class="form-group">
<label class="col-md-2 control-label" for="name">Name</label>
<div class="col-md-10">
<input class="form-control" name="name" type="text" id="name" placeholder="Name" value="" />
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="exampleInputPassword1">Password</label>
<div class="col-md-10">
<input type="password" name="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
</div>
<div class="form-group">
<label for="intro" class="control-label col-md-2">Intro</label>
<div class="col-md-10">
<textarea id="intro" class="form-control" rows="3" name="intro" placeholder="Intro"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">Gender</label>
<div class="col-md-10">
<label class="radio-inline">
<input type="radio" name="gender" value="男" />
boy </label>
<label class="radio-inline">
<input type="radio" name="gender" value="女" />
gril </label>
</div>
</div>
<div class="form-group">
<label for="hobby" class="control-label col-md-2">Hobby</label>
<div class="col-md-10">
<div class="checkbox">
<label>
<input type="checkbox" name="hobby" value="Music">
Music</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="hobby" id="" value="Game" />
Game </label>
</div>
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox1" value="option1">
option1 </label>
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox2" value="option2">
option3</label>
<label class="checkbox-inline">
<input type="checkbox" id="inlineCheckbox3" value="option3">
option3 </label>
</div>
</div>
<div class="form-group">
<label for="sel" class="control-label col-md-2">Select</label>
<div class="col-md-10">
<select multiple="" id="sel" name="sel" class="form-control">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<button type="submit" class="btn btn-primary btn-sm">
Submit
</button>
<button type="reset" class="btn btn-primary btn-sm">
Reset
</button>
</div>
</div>
</form>
</div>
<script src="app/lib/jquery-1.11.1.js" type="text/javascript" charset="utf-8"></script>
<script src="app/lib/bootstrap/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
<script src="app/lib/jquery-validation/dist/jquery.validate.js" type="text/javascript" charset="utf-8"></script>
<script src="app/js/form.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
MyValidator.init();
</script>
</body>
</html>