select_place.html
2.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_782635_cvxdd8r2ec.css"/>
<link rel="stylesheet" href="css/select_place.css "/>
<script src="js/base.js"></script>
<title>选择地区</title>
</head>
<body>
<div class="container">
<form class="form-inline">
<div data-toggle="distpicker" class="date">
<div class="form-group">
<select class="form-control" id="province1"></select>
</div>
<div class="form-group">
<select class="form-control" id="city1"></select>
</div>
<div class="form-group">
<select class="form-control" id="district1"></select>
</div>
</div>
</form>
<div class="foot">
<p class="sure">确定</p>
<p class="cancel">取消</p>
</div>
</div>
<script src="http://www.jq22.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://www.jq22.com/jquery/bootstrap-3.3.4.js"></script>
<script src="js/distpicker.data.js"></script>
<script src="js/distpicker.js"></script>
<script src="js/main.js"></script>
<!--<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>-->
<!--<script type="text/javascript" src="js/jquery.cityselect.js"></script>-->
<script>
$(".cancel").click(function(){
window.history.back()
})
//选择省
$("#province1").change(function(){
var province=$('#province option:selected').text();
console.log(province)
})
//选择市
$("#city1").change(function(){
var city=$('#city1 option:selected').text();
console.log(city)
})
//选择区
$("#district1").change(function(){
var district=$('#district1 option:selected').text();
console.log(district)
})
</script>
</body>
</html>