select_place.html 2.0 KB
<!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>