js实现省市级联代码
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
js的写法:place.js
//province(省份类)
function provinceList()
{
this.length=36;
this[0] = new Option("不限","不限");
this[1] = new Option("北京","北京");
this[2] = new Option("重庆","重庆");
this[3] = new Option("福建","福建");
this[4] = new Option("甘肃","甘肃");
this[5] = new Option("广东","广东");
this[6] = new Option("广西","广西");
this[7] = new Option("贵州","贵州");
this[8] = new Option("海南","海南");
this[9] = new Option("河北","河北");
this[10] = new Option("河南","河南");
this[11] = new Option("黑龙江","黑龙江"); this[12] = new Option("湖北","湖北");
this[13] = new Option("湖南","湖南");
this[14] = new Option("江苏","江苏");
this[15] = new Option("江西","江西");
this[16] = new Option("吉林","吉林");
this[17] = new Option("辽宁","辽宁");
this[18] = new Option("内蒙古","内蒙古"); this[19] = new Option("宁夏","宁夏");
this[20] = new Option("青海","青海");
this[21] = new Option("上海","上海");
this[22] = new Option("山东","山东");
this[23] = new Option("山西","山西");
this[24] = new Option("陕西","陕西");
this[25] = new Option("四川","四川");
this[26] = new Option("天津","天津");
this[27] = new Option("新疆","新疆");
this[28] = new Option("西藏","西藏");
this[29] = new Option("云南","云南");
this[30] = new Option("浙江","浙江");
this[31] = new Option("安徽","安徽");
this[32] = new Option("香港","香港");
this[33] = new Option("澳门","澳门");
this[34] = new Option("台湾","台湾");
this[35] = new Option("其它","其他");
return this;
}
//city(城市类)
function citylist()
{
this.length=36;
this[0] = new Array(1);
this[0][0] = new Option("不限","不限");
this[1] = new Array(1);
this[1][0] = new Option("北京市","北京市");
this[2] = new Array(4);
this[2][0] = new Option("重庆市","重庆市");
this[2][1] = new Option("涪陵市","涪陵市");
this[2][2] = new Option("黔江市","黔江市");
this[2][3] = new Option("万县市","万县市");
this[3] = new Array(9);
this[3][0] = new Option("福州市","福州市");
this[3][1] = new Option("龙岩市","龙岩市");
this[3][2] = new Option("南平市","南平市");
this[3][3] = new Option("宁德市","宁德市");
this[3][4] = new Option("莆田市","莆田市");
this[3][5] = new Option("泉州市","泉州市");
this[3][6] = new Option("三明市","三明市");
this[3][7] = new Option("厦门市","厦门市");
this[3][8] = new Option("漳州市","漳州市");
this[4] = new Array(14);
this[4][0] = new Option("兰州市","兰州市");
this[4][1] = new Option("甘南藏族自治州","甘南藏族自治州"); this[4][2] = new Option("定西地区","定西地区");
this[4][3] = new Option("白银市","白银市");
this[4][4] = new Option("嘉峪关市","嘉峪关市");
this[4][5] = new Option("金昌市","金昌市");
this[4][6] = new Option("酒泉市","酒泉市");
this[4][7] = new Option("宁夏回族自治州","宁夏回族自治州"); this[4][8] = new Option("陇南地区","陇南地区");
this[4][9] = new Option("平凉市","平凉市");
this[4][10] = new Option("庆阳市","庆阳市");
this[4][11] = new Option("天水市","天水市");
this[4][12] = new Option("武威市","武威市");
this[4][13] = new Option("张掖市","张掖市");
this[5] = new Array(21);
this[5][0] = new Option("广州市","广州市");
this[5][1] = new Option("佛山市","佛山市");
this[5][2] = new Option("惠州市","惠州市");
this[5][3] = new Option("东莞市","东莞市");
this[5][4] = new Option("江门市","江门市");