jquery distpicker.js 省市区选择器js插件


jquery distpicker.js 省市区选择器js插件

第一步引入bfwone

第二步执行插件方法

示例如下

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>BFW NEW PAGE</title>
    <script id="bfwone" data="dep=jquery.17|distpicker.data&err=0" type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/bfwone.js"></script>
    <script type="text/javascript">
        bready(function() {
            use(["distpicker","bootstrap"], function() {
                $("#distpicker").distpicker({
                    province: "浙江省",
                    city: "杭州市",
                    district: "西湖区"
                });
            });
        });
    </script>
</head>
<body>
    <form class="form-inline" style="margin:20% 20%;">
        <div data-toggle="distpicker">
            <div class="form-group">
                <label class="sr-only" for="province2">Province</label>
                <select class="form-control" id="province2" data-province="---- 选择省 ----"></select>
            </div>
            <div class="form-group">
                <label class="sr-only" for="city2">City</label>
                <select class="form-control" id="city2" data-city="---- 选择市 ----"></select>
            </div>
            <div class="form-group">
                <label class="sr-only" for="district2">District</label>
                <select class="form-control" id="district2" data-district="---- 选择区 ----"></select>
            </div>
        </div>
    </form>
</body>
</html>


立即下载distpicker.js 查看所有js插件

网友评论0

程序员在线工具箱