html省市联动插件,jquery实现的交互体验更友好省市区三级联动插件

Options

Change the default options with $().citypicker(options).

Change the global default options with $.fn.citypicker.setDefaults(options).

simple

Type: Boolean

Default: false

Make the address level more simple, e.g. 内蒙古 instead of 内蒙古自治区.

level

Type: String

Default: district

Only province, province + city, or province + city + district.

responsive

Type: Boolean

Default: false

make the drop down and mask span responsive on width.

placeholder

Type: Boolean

Default: 请输入省/市/区

Show placeholder (with an element).

province

Type: String

Default: null

Defines the initial value of province. If it is a existing province in city-picker.data.js, it will be selected. If not, it will be used as a placeholder.

city

Type: String

Default: null

Defines the initial value of city. If it is a existing city under the

selected province, it will be selected. If not, it will be used as a

placeholder.

district

Type: String

Default: null

Defines the initial value of district. If it is a existing district

under the selected city, it will be selected. If not, it will be used as

a placeholder.

Methods

reset()

Reset the selects to the initial states (Undo changed).

Examples:

$().citypicker('reset');

destroy()

Destroy the city-picker instance, but keep the selected districts.

If you want to remove the selected districts, you can call reset method first and then call this method.

No conflict

If you have to use other plugin with the same namespace, just call the $.fn.city-picker.noConflict method to revert to it.

Browser support

Chrome (latest 2)

Firefox (latest 2)

Internet Explorer 8+

Opera (latest 2)

Safari (latest 2)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值