bootstrap 多选框



引入 <link href="css/plugins/chosen/chosen.css" rel="stylesheet">
    <script src="js/plugins/chosen/chosen.jquery.js"></script>

在js文件中加入:

        var config = {
            '.chosen-select': {},
            '.chosen-select-deselect': {
                allow_single_deselect: true
            },
            '.chosen-select-no-single': {
                disable_search_threshold: 10
            },
            '.chosen-select-no-results': {
                no_results_text: 'Oops, nothing found!'
            },
            '.chosen-select-width': {
                width: "95%"
            }
        }
        for (var selector in config) {
            $(selector).chosen(config[selector]);
        }



<div class="form-group">

                            <label class="font-noraml">多选</label>
                            <div class="input-group">
                                <select data-placeholder="选择省份" class="chosen-select" multiple style="width:350px;" tabindex="4">
                                    <option value="">请选择省份</option>
                                    <option value="110000" hassubinfo="true">北京</option>
                                    <option value="120000" hassubinfo="true">天津</option>
                                    <option value="130000" hassubinfo="true">河北省</option>
                                    <option value="140000" hassubinfo="true">山西省</option>
                                    <option value="150000" hassubinfo="true">内蒙古自治区</option>
                                    <option value="210000" hassubinfo="true">辽宁省</option>
                                    <option value="220000" hassubinfo="true">吉林省</option>
                                    <option value="230000" hassubinfo="true">黑龙江省</option>
                                    <option value="310000" hassubinfo="true">上海</option>
                                    <option value="320000" hassubinfo="true">江苏省</option>
                                    <option value="330000" hassubinfo="true">浙江省</option>
                                    <option value="340000" hassubinfo="true">安徽省</option>
                                    <option value="350000" hassubinfo="true">福建省</option>
                                    <option value="360000" hassubinfo="true">江西省</option>
                                    <option value="370000" hassubinfo="true">山东省</option>
                                    <option value="410000" hassubinfo="true">河南省</option>
                                    <option value="420000" hassubinfo="true">湖北省</option>
                                    <option value="430000" hassubinfo="true">湖南省</option>
                                    <option value="440000" hassubinfo="true">广东省</option>
                                    <option value="450000" hassubinfo="true">广西壮族自治区</option>
                                    <option value="460000" hassubinfo="true">海南省</option>
                                    <option value="500000" hassubinfo="true">重庆</option>
                                    <option value="510000" hassubinfo="true">四川省</option>
                                    <option value="520000" hassubinfo="true">贵州省</option>
                                    <option value="530000" hassubinfo="true">云南省</option>
                                    <option value="540000" hassubinfo="true">西藏自治区</option>
                                    <option value="610000" hassubinfo="true">陕西省</option>
                                    <option value="620000" hassubinfo="true">甘肃省</option>
                                    <option value="630000" hassubinfo="true">青海省</option>
                                    <option value="640000" hassubinfo="true">宁夏回族自治区</option>
                                    <option value="650000" hassubinfo="true">新疆维吾尔自治区</option>
                                    <option value="710000" hassubinfo="true">台湾省</option>
                                    <option value="810000" hassubinfo="true">香港特别行政区</option>
                                    <option value="820000" hassubinfo="true">澳门特别行政区</option>
                                    <option value="990000" hassubinfo="true">海外</option>
                                </select>
                            </div>
                        </div>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值