• 三级联动效果


    使用city-picker来实现效果

    <!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">
        <meta name="description" content="A simple jQuery plugin for picking provinces, cities and districts of China.">
        <meta name="keywords"
              content="中国, 省份, 城市, 行政区, 省市区, 三级联动, 地址选择器, HTML, CSS, JS, JavaScript, jQuery plugin, province, city, district, pick, picker, picking, front-end, frontend, web development">
        <meta name="author" content="Tao Shi">
        <title>city-picker</title>
        <link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.css" rel="stylesheet">
        <link href="css/city-picker.css" rel="stylesheet">
        <link href="css/main.css" rel="stylesheet">
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>
    <script src="js/city-picker.data.js"></script>
    <script src="js/city-picker.js"></script>
    <script src="js/main.js"></script>
    </head>
    <body>
        <div class="docs-methods">
            <form class="form-inline">
                <div id="distpicker">
                    <div class="form-group">
                        <div style="position: relative;">
                            <input id="city-picker3" class="form-control" readonly type="text" value="江苏省/常州市/溧阳市"
                                   data-toggle="city-picker">
                        </div>
                    </div>
                    <div class="form-group">
                     <button class="btn btn-warning" id="reset" type="button">reset</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    
    
    <!-- Scripts -->
    
    </body>
    </html>
    

      js的文件可以在官方文档中下载

    http://tshi0912.github.io/city-picker/
    

     实现的效果

     

  • 相关阅读:
    mysql关联取附表最后一条记录,附加lareval orm实现
    lumen 常用辅助函数
    Lumen Carbon 日期及时间处理包
    $_SERVER,IP,域名常用方法
    上传Docker镜像到阿里云
    connect() failed (111: Connection refused) while connecting to upstream, cli
    linux使用常见问题
    docker实用命名
    yii 常用orm
    Hibernate多对多映射(双向关联)实例详解——真
  • 原文地址:https://www.cnblogs.com/fjkgrbk/p/city_picker.html
Copyright © 2020-2023  润新知