jQuery省市区三级联动插件city-picker(插件二)

大家在写前端,尤其是涉及到用户信息时候,都需要用到省市县城市联动,本文讲述使用jquery实现三级城市联动,这款插件使用起来赶脚还是蛮不错的,这里分享大家,有需要的小伙伴可直接使用,我是一只勤劳的小蜜蜂,工作在猿一线......

js、css下载

效果:

1512399857690375.jpg

代码:

<link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="/static/city-picker/css/city-picker.css" rel="stylesheet" type="text/css" />
<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">重置</button>
                <button class="btn btn-danger" id="destroy" type="button">确定</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="/static/node_modules/jquery/dist/jquery.min.js"></script>
<script src="/static/node_modules/bootstrap3/dist/js/bootstrap.min.js"></script>
<script src="/static/city-picker/js/city-picker.data.js"></script>
<script src="/static/city-picker/js/city-picker.js"></script>
<script src="/static/city-picker/js/main.js"></script

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动。

武斌博客 http://www.wubin.pro

Top