三级联动效果
Posted fjk
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了三级联动效果相关的知识,希望对你有一定的参考价值。
使用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/
实现的效果
以上是关于三级联动效果的主要内容,如果未能解决你的问题,请参考以下文章