-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
82 lines (81 loc) · 3.55 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery 省市县联动插件</title>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
<style>
.homtown {
display: flex;
justify-content: space-between;
}
.homtown select {
width: 32%;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<h3> </h3>
<form class="form-horizontal col-sm-6 col-sm-offset-3" role="form">
<fieldset>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">姓名</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">密码</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">邮箱</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">性别</label>
<div class="col-sm-10">
<div class="radio-inline"><input type="radio"> 男 </div>
<div class="radio-inline"><input type="radio"> 女 </div>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">家乡</label>
<div class="col-sm-10 homtown">
<!-- id可以任意值,data-id 设置默认地区 -->
<select id="province" data-id="130000" class="form-control">
<option value="">请选择省份</option>
</select>
<select id="city" data-id="130600" class="form-control">
<option value="">请选择城市</option>
</select>
<select id="district" data-id="130634" class="form-control">
<option value="">请选择县/地区</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success pull-right"> 保 存 </button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
<script src="./jquery.js"></script>
<script src="./jquery.region.js"></script>
<script>
$('.homtown').region({
url: './region.json' // 省市县接口
});
</script>
</body>
</html>