2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > html省市联动插件 jquery实现的交互体验更友好省市区三级联动插件

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

时间:2021-05-27 12:23:15

相关推荐

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)

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。