Fetch the repository succeeded.
This action will force synchronization from RockYang/JAreaSelect-js省市区级联选择插件, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
JAreaSelect区域选择插件是一个区域选择的js插件。数据是抓取京东的最新的区域数据。 很全面,大约5000多条,涵盖了中国所有的地区,包括钓鱼岛在内。提供了普通样式和仿京东样式的小工具,另外还提供了一个超级简陋的管理界面, 由于是个小项目,图省事,就不想引入什么框架的,直接原生写的,不喜欢请勿拍砖。
<!--html代码-->
<p><button class="btn btn-primary">显示选中区域</button></p>
<div id="area-select-box" class="form-inline"></div>
//普通样式
var area = $("#area-select-box").JAreaSelect({
prov : 1,
city : 72,
dist : 2839,
});
$(".btn-primary").on('click', function() {
alert(area.getAreaString());
console.log(area.getAreaId());
});
//仿京东样式
$("#area-select").JAreaSelect2({
prov : 1,
city : 72,
dist : 2839,
callback : function(data) {
console.log(data);
$(".btn-primary").html(data.address);
}
});
Key | 类型 | 说明 |
---|---|---|
selectClassName | string | select class 属性,用来方便你调节UI的 |
prov | int | 初始化的省份ID |
city | int | 初始化城市ID |
dist | int | 初始化地区ID |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。