1.建议下载1.0.4版本,下载地址  https://github.com/fengyuanchen/distpicker

2.代码如下,包括赋初始值,可做编辑时回显值

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body>
    <script src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
    <script src="js\distpicker.data.js"></script>
    <script src="js\distpicker.js"></script>
    <div class="aui-list-item-inner" id="distpicker" data-toggle="distpicker">
      <div class="aui-col-xs-5"><select id="province"></select></div>
      <div class="aui-col-xs-7"><select id="city"></select></div>
      <div class="aui-col-xs-7"><select id="district"></select></div>
    </div>
    <script>
      $("#distpicker").distpicker({
        province: "江苏省",
        city: "无锡市",
        district:'惠山区'
      });
    </script>
  </body>
</html>

 

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐