真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

省市javascript的簡(jiǎn)單介紹

用JS實(shí)現(xiàn)省市下拉框怎么做?

試試這個(gè):

成都創(chuàng)新互聯(lián)公司成立于2013年,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元太子河做網(wǎng)站,已為上家服務(wù),為太子河各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18982081108

script language="JavaScript"

!--

var g_selProvince;

var g_selCity;

var Provinces=new Array(

new Array("110000","北京市"),

new Array("120000","天津市"),

new Array("130000","河北省"),

new Array("140000","山西省"),

new Array("150000","內(nèi)蒙古自治區(qū)"),

new Array("210000","遼寧省"),

new Array("220000","吉林省"),

new Array("230000","黑龍江省"),

new Array("310000","上海市"),

new Array("320000","江蘇省"),

new Array("330000","浙江省"),

new Array("340000","安徽省"),

new Array("350000","福建省"),

new Array("360000","江西省"),

new Array("370000","山東省"),

new Array("410000","河南省"),

new Array("420000","湖北省"),

new Array("430000","湖南省"),

new Array("440000","廣東省"),

new Array("450000","廣西壯族自治區(qū)"),

new Array("460000","海南省"),

new Array("500000","重慶市"),

new Array("510000","四川省"),

new Array("520000","貴州省"),

new Array("530000","云南省"),

new Array("540000","西藏自治區(qū)"),

new Array("610000","陜西省"),

new Array("620000","甘肅省"),

new Array("630000","青海省"),

new Array("640000","寧夏回族自治區(qū)"),

new Array("650000","新疆維吾爾自治區(qū)"),

new Array("710000","臺(tái)灣省"),

new Array("810000","香港特別行政區(qū)"),

new Array("820000","澳門特別行政區(qū)")

);

var Citys=new Array(

new Array("110100","北京"),

new Array("120100","天津"),

new Array("130101","石家莊"),

new Array("130201","唐山"),

new Array("130301","秦皇島"),

new Array("130701","張家口"),

new Array("130801","承德"),

new Array("131001","廊坊"),

new Array("130401","邯鄲"),

new Array("130501","邢臺(tái)"),

new Array("130601","保定"),

new Array("130901","滄州"),

new Array("133001","衡水"),

new Array("140101","太原"),

new Array("140201","大同"),

new Array("140301","陽泉"),

new Array("140501","晉城"),

new Array("140601","朔州"),

new Array("142201","忻州"),

new Array("142331","離石"),

new Array("142401","榆次"),

new Array("142601","臨汾"),

new Array("142701","運(yùn)城"),

new Array("140401","長(zhǎng)治"),

new Array("150101","呼和浩特"),

new Array("150201","包頭"),

new Array("150301","烏海"),

new Array("152601","集寧"),

new Array("152701","東勝"),

new Array("152801","臨河"),

new Array("152921","阿拉善左旗"),

new Array("150401","赤峰"),

new Array("152301","通遼"),

new Array("152502","錫林浩特"),

new Array("152101","海拉爾"),

new Array("152201","烏蘭浩特"),

new Array("210101","沈陽"),

new Array("210201","大連"),

new Array("210301","鞍山"),

new Array("210401","撫順"),

new Array("210501","本溪"),

new Array("210701","錦州"),

new Array("210801","營(yíng)口"),

new Array("210901","阜新"),

new Array("211101","盤錦"),

new Array("211201","鐵嶺"),

new Array("211301","朝陽"),

new Array("211401","錦西"),

new Array("210601","丹東"),

new Array("220101","長(zhǎng)春"),

new Array("220201","吉林"),

new Array("220301","四平"),

new Array("220401","遼源"),

new Array("220601","渾江"),

new Array("222301","白城"),

new Array("222401","延吉"),

new Array("220501","通化"),

new Array("230101","哈爾濱"),

new Array("230301","雞西"),

new Array("230401","鶴崗"),

new Array("230501","雙鴨山"),

new Array("230701","伊春"),

new Array("230801","佳木斯"),

new Array("230901","七臺(tái)河"),

new Array("231001","牡丹江"),

new Array("232301","綏化"),

new Array("230201","齊齊哈爾"),

new Array("230601","大慶"),

new Array("232601","黑河"),

new Array("232700","加格達(dá)奇"),

new Array("310100","上海"),

new Array("320101","南京"),

new Array("320201","無錫"),

new Array("320301","徐州"),

new Array("320401","常州"),

new Array("320501","蘇州"),

new Array("320600","南通"),

new Array("320701","連云港"),

new Array("320801","淮陰"),

new Array("320901","鹽城"),

new Array("321001","揚(yáng)州"),

new Array("321101","鎮(zhèn)江"),

new Array("330101","杭州"),

new Array("330201","寧波"),

new Array("330301","溫州"),

new Array("330401","嘉興"),

new Array("330501","湖州"),

new Array("330601","紹興"),

new Array("330701","金華"),

new Array("330801","衢州"),

new Array("330901","舟山"),

new Array("332501","麗水"),

new Array("332602","臨海"),

new Array("340101","合肥"),

new Array("340201","蕪湖"),

new Array("340301","蚌埠"),

new Array("340401","淮南"),

new Array("340501","馬鞍山"),

new Array("340601","淮北"),

new Array("340701","銅陵"),

new Array("340801","安慶"),

new Array("341001","黃山"),

new Array("342101","阜陽"),

new Array("342201","宿州"),

new Array("342301","滁州"),

new Array("342401","六安"),

new Array("342501","宣州"),

new Array("342601","巢湖"),

new Array("342901","貴池"),

new Array("350101","福州"),

new Array("350201","廈門"),

new Array("350301","莆田"),

new Array("350401","三明"),

new Array("350501","泉州"),

new Array("350601","漳州"),

new Array("352101","南平"),

new Array("352201","寧德"),

new Array("352601","龍巖"),

new Array("360101","南昌"),

new Array("360201","景德鎮(zhèn)"),

new Array("362101","贛州"),

new Array("360301","萍鄉(xiāng)"),

new Array("360401","九江"),

new Array("360501","新余"),

new Array("360601","鷹潭"),

new Array("362201","宜春"),

new Array("362301","上饒"),

new Array("362401","吉安"),

new Array("362502","臨川"),

new Array("370101","濟(jì)南"),

new Array("370201","青島"),

new Array("370301","淄博"),

new Array("370401","棗莊"),

new Array("370501","東營(yíng)"),

new Array("370601","煙臺(tái)"),

new Array("370701","濰坊"),

new Array("370801","濟(jì)寧"),

new Array("370901","泰安"),

new Array("371001","威海"),

new Array("371100","日照"),

new Array("372301","濱州"),

new Array("372401","德州"),

new Array("372501","聊城"),

new Array("372801","臨沂"),

new Array("372901","菏澤"),

new Array("410101","鄭州"),

new Array("410201","開封"),

new Array("410301","洛陽"),

new Array("410401","平頂山"),

new Array("410501","安陽"),

new Array("410601","鶴壁"),

new Array("410701","新鄉(xiāng)"),

new Array("410801","焦作"),

new Array("410901","濮陽"),

new Array("411001","許昌"),

new Array("411101","漯河"),

new Array("411201","三門峽"),

new Array("412301","商丘"),

new Array("412701","周口"),

new Array("412801","駐馬店"),

new Array("412901","南陽"),

new Array("413001","信陽"),

new Array("420101","武漢"),

new Array("420201","黃石"),

new Array("420301","十堰"),

new Array("420400","沙市"),

new Array("420501","宜昌"),

new Array("420601","襄樊"),

new Array("420701","鄂州"),

new Array("420801","荊門"),

new Array("422103","黃州"),

new Array("422201","孝感"),

new Array("422301","咸寧"),

new Array("422421","江陵"),

new Array("422801","恩施"),

new Array("430101","長(zhǎng)沙"),

new Array("430401","衡陽"),

new Array("430501","邵陽"),

new Array("432801","郴州"),

new Array("432901","永州"),

new Array("430801","大庸"),

new Array("433001","懷化"),

new Array("433101","吉首"),

new Array("430201","株洲"),

new Array("430301","湘潭"),

new Array("430601","岳陽"),

new Array("430701","常德"),

new Array("432301","益陽"),

new Array("432501","婁底"),

new Array("440101","廣州"),

new Array("440301","深圳"),

new Array("441501","汕尾"),

new Array("441301","惠州"),

new Array("441601","河源"),

new Array("440601","佛山"),

new Array("441801","清遠(yuǎn)"),

new Array("441901","東莞"),

new Array("440401","珠海"),

new Array("440701","江門"),

new Array("441201","肇慶"),

new Array("442001","中山"),

new Array("440801","湛江"),

new Array("440901","茂名"),

new Array("440201","韶關(guān)"),

new Array("440501","汕頭"),

new Array("441401","梅州"),

new Array("441701","陽江"),

new Array("450101","南寧"),

new Array("450401","梧州"),

new Array("452501","玉林"),

new Array("450301","桂林"),

new Array("452601","百色"),

new Array("452701","河池"),

new Array("452802","欽州"),

new Array("450201","柳州"),

new Array("450501","北海"),

new Array("460100","???),

new Array("460200","三亞"),

new Array("510101","成都"),

new Array("513321","康定"),

new Array("513101","雅安"),

new Array("513229","馬爾康"),

new Array("510301","自貢"),

new Array("500100","重慶"),

new Array("512901","南充"),

new Array("510501","瀘州"),

new Array("510601","德陽"),

new Array("510701","綿陽"),

new Array("510901","遂寧"),

new Array("511001","內(nèi)江"),

new Array("511101","樂山"),

new Array("512501","宜賓"),

new Array("510801","廣元"),

new Array("513021","達(dá)縣"),

new Array("513401","西昌"),

new Array("510401","攀枝花"),

new Array("500239","黔江土家族苗族自治縣"),

new Array("520101","貴陽"),

new Array("520200","六盤水"),

new Array("522201","銅仁"),

new Array("522501","安順"),

new Array("522601","凱里"),

new Array("522701","都勻"),

new Array("522301","興義"),

new Array("522421","畢節(jié)"),

new Array("522101","遵義"),

new Array("530101","昆明"),

new Array("530201","東川"),

new Array("532201","曲靖"),

new Array("532301","楚雄"),

new Array("532401","玉溪"),

new Array("532501","個(gè)舊"),

new Array("532621","文山"),

new Array("532721","思茅"),

new Array("532101","昭通"),

new Array("532821","景洪"),

new Array("532901","大理"),

new Array("533001","保山"),

new Array("533121","潞西"),

new Array("533221","麗江納西族自治縣"),

new Array("533321","瀘水"),

new Array("533421","中甸"),

new Array("533521","臨滄"),

new Array("540101","拉薩"),

new Array("542121","昌都"),

new Array("542221","乃東"),

new Array("542301","日喀則"),

new Array("542421","那曲"),

new Array("542523","噶爾"),

new Array("542621","林芝"),

new Array("610101","西安"),

new Array("610201","銅川"),

new Array("610301","寶雞"),

new Array("610401","咸陽"),

new Array("612101","渭南"),

new Array("612301","漢中"),

new Array("612401","安康"),

new Array("612501","商州"),

new Array("612601","延安"),

new Array("612701","榆林"),

new Array("620101","蘭州"),

new Array("620401","白銀"),

new Array("620301","金昌"),

new Array("620501","天水"),

new Array("622201","張掖"),

new Array("622301","武威"),

new Array("622421","定西"),

new Array("622624","成縣"),

new Array("622701","平?jīng)?),

new Array("622801","西峰"),

new Array("622901","臨夏"),

new Array("623027","夏河"),

new Array("620201","嘉峪關(guān)"),

new Array("622102","酒泉"),

new Array("630100","西寧"),

new Array("632121","平安"),

new Array("632221","門源回族自治縣"),

new Array("632321","同仁"),

new Array("632521","共和"),

new Array("632621","瑪沁"),

new Array("632721","玉樹"),

new Array("632802","德令哈"),

new Array("640101","銀川"),

new Array("640201","石嘴山"),

new Array("642101","吳忠"),

new Array("642221","固原"),

new Array("650101","烏魯木齊"),

new Array("650201","克拉瑪依"),

new Array("652101","吐魯番"),

new Array("652201","哈密"),

new Array("652301","昌吉"),

new Array("652701","博樂"),

new Array("652801","庫爾勒"),

new Array("652901","阿克蘇"),

new Array("653001","阿圖什"),

new Array("653101","喀什"),

new Array("654101","伊寧"),

new Array("710001","臺(tái)北"),

new Array("710002","基隆"),

new Array("710020","臺(tái)南"),

new Array("710019","高雄"),

new Array("710008","臺(tái)中"),

new Array("211001","遼陽"),

new Array("653201","和田"),

new Array("542200","澤當(dāng)鎮(zhèn)"),

new Array("542600","八一鎮(zhèn)"),

new Array("820000","澳門"),

new Array("810000","香港")

);

function FillProvinces(selProvince)

{

selProvince.options[0]=new Option("請(qǐng)選擇","000000");

for(i=0;iProvinces.length;i++)

{

selProvince.options[i+1]=new Option(Provinces[i][1],Provinces[i][0]);

}

selProvince.options[0].selected=true;

selProvince.length=i+1;

}

function FillCitys(selCity,ProvinceCode)

{

//if the province is a direct-managed city, like Beijing, shanghai, tianjin, chongqin,hongkong, macro

//need not "請(qǐng)選擇選項(xiàng)"

if(ProvinceCode=="110000"||ProvinceCode=="120000"||ProvinceCode=="310000"

||ProvinceCode=="810000"||ProvinceCode=="820000"||ProvinceCode=="500000")

count=0;

else

{selCity.options[0]=new Option("請(qǐng)選擇",ProvinceCode);

count=1;}

for(i=0;iCitys.length;i++)

{

if(Citys[i][0].toString().substring(0,2)==ProvinceCode.substring(0,2))

{

selCity.options[count]=new Option(Citys[i][1],Citys[i][0]);

count=count+1;

}

}

selCity.options[0].selected=true;

selCity.length=count;

}

function Province_onchange()

{

FillCitys(g_selCity,g_selProvince.value);

}

function InitCitySelect(selProvince,selCity)

{

//alert("begin");

g_selProvince=selProvince;

g_selCity=selCity;

selProvince.onchange=Function("Province_onchange();");

FillProvinces(selProvince);

Province_onchange();

}

function InitCitySelect2(selProvince,selCity,CityCode)

{

InitCitySelect(selProvince,selCity)

for(i=0;iselProvince.length;i++)

{

if(selProvince.options[i].value.substring(0,2)==CityCode.substring(0,2))

{

selProvince.options[i].selected=true;

}

}

Province_onchange();

for(i=0;iselCity.length;i++)

{

if(selCity.options[i].value==CityCode)

{

selCity.options[i].selected=true;

}

}

}

//--

/script

form name="profile" method="post" action="where.asp"

SELECT id=province size=1 name=province

OPTION selected/OPTION

/SELECT

SELECT id=city size=1 name=city

OPTION selected/OPTION

/SELECT

SCRIPT language=javascript

InitCitySelect(document.profile.province,document.profile.city);

/SCRIPT

input type="submit"

/form

如你要提取市的數(shù)據(jù),你需要在接受請(qǐng)求頁面寫如下代碼:

shi=trim(request.form("city"))

就可以得到市的值了。

還有這是用Form傳遞參數(shù),而不是用QueryString傳遞。

JavaScript實(shí)現(xiàn)省市縣級(jí)聯(lián)

寫的似乎有點(diǎn)麻煩,不如直接在下拉列表的Option里添加。

我簡(jiǎn)單給你寫個(gè)。

script language="javascript"

var arr=new Array();

arr["廣州01"]=["東城區(qū)","東城區(qū)","越秀區(qū)"];

arr["廣州02"]=["蘿崗區(qū)","天河區(qū)","南沙區(qū)"];

arr["廣州03"]=["越秀區(qū)","鹽田區(qū)","龍崗區(qū)"];

function Test()

{

var province=document.getElementById("province").value;

var district=document.getElementById("district");

//清空

district.length=1;

for(var i=0;iarr[province].length;i++)

{

var opt=new Option(arr[province][i],arr[province][i]);

district.options.add(opt);

}

}

/script

body

select id="province" onchange="Test()"

option--請(qǐng)選擇--/option

option value="廣州01"廣州01/option

option value="廣州02"廣州02/option

option value="廣州03"廣州03/option

/select

select id="district"option--請(qǐng)選擇--/option/select

/body

javascript中在下拉列表中用數(shù)組選擇省市

function changeCity()

{

var province=document.myform.selProvince.value; //這里的document.myform.selProvince是頁面中有個(gè)id是"myform"的表單(form),里面有個(gè)下拉列表,id是 selProvince,整個(gè)的意思就是取它的值,也就是選中的省。

document.myform.selCity.options.length=0; //把selCity下拉列表的選項(xiàng)清0

for (var i in cityList) //循環(huán)每一個(gè)cityList 的成員

{

if (i == province)

{

for (var j in cityList[i])

{

document.myform.selCity.options.add(new Option(cityList[i][j], cityList[i][j])); //給selCity下拉列表增加條目,也就是選擇項(xiàng)。 每個(gè)下拉列表都有options集合,它add一個(gè)option對(duì)象就能增加一個(gè)條目

}

}

}

document.myform.selCity.options.selctIndex=0; //讓celCity下拉列表選中第一個(gè)選項(xiàng)

}

function AllCity(){

for (var i in cityList)

{

document.myform.selProvince.options.add(new Option(i, i)); //為selProvince下拉列表增加一個(gè)省份選項(xiàng)

}

document.myform.selProvince.selectedIndex = 0; //讓省份下拉列表選中第一個(gè)選項(xiàng)。

}

其實(shí) document.myform.selProvince 這樣的寫法不好,不一定每個(gè)瀏覽器都支持,IE以外的瀏覽器很可能會(huì)報(bào)錯(cuò)。正確的寫法是 document.getElementById("下拉列表ID") ,這樣的寫法走到哪里都不會(huì)出錯(cuò)。

誰知道國(guó)家選省份的javascript腳本,給個(gè)例子地址也可以。謝謝大家了!

這個(gè)是我國(guó)的各省的城市選擇網(wǎng)頁,你可以按自己的要求進(jìn)行一些改動(dòng).

html

head

meta http-equiv="Content-Type" content="text/html; charset=UTF-8"

title省份選城市/title

style type="text/css"

!--

form{margin:0;padding:0;}

img{border:0;}

body,select,input,td{ font-family:宋體,Arial; font-size: 12px; font-family: Arial; margin-top: 2px;}

#hd{clear:both;width:700px;margin:0 auto;margin-bottom:.5em;padding:.5em 0 0 0;}

.rlcon a{text-decoration:none;margin-left:.3em;}

.mcon,.lpanel,.panel{text-align:left;}

.lg{float:left;width:185px;padding:.5em 0;}

.rl{float:right;width:100%;margin:0 0 0 -30em;}

.rlcon{text-align:right;height:32px;margin:0 0 0 190px;color:#b8b8b8;border-bottom:1px solid #b5b5b5;overflow:hidden;line-height:45px;}

#lcon{float:left;width:180px;}

#mcon{float:right;width:100%;margin:0 0 0 -20em;}

.mcon{margin:0 0 0 190px;width:570px;}

.xb{border-top:1px solid transparent !important;border-top:0;clear:both;}

#footer {margin:0 auto;width:740px;text-align:center;font-size:12px;height:30px;line-height:30px;border-top:1px solid #666;}

table{clear:both;text-align:left;}

#tip{clear:both;margin:0 auto;width:500px;background-color:#ffffe1;border:1px solid #ACA899;padding:1em;margin:1em;text-align:left;color:#ff0000;}

#tip #cancel{float:right;}

#tip ul{display:block;margin:0;padding:0;list-style-type:none;}

#tip ul li{float:left;width:220px;line-height:1.5em;background-color:#ffffe1;}

#hidenbox{border-top:1px solid transparent !important;border-top:0;clear:both;}

.bnt14{font-size:13px;font-family:宋體,Arial;line-height:18px;height:25px;}

--

/style

/head

html

body

center

form name="personalorder" action="preferences" method="POST"

div id="hd"

TABLE height=20 cellSpacing=0 cellPadding=0 width=714 align=center

border=0

TBODY

TR

TD height="60" vAlign=center DIV class=s5 align=center選擇省市:

select name="prov" onchange="setInd(this)"

option value=0不預(yù)定/optionoption value=8610北京/optionoption value=8621上海/optionoption value=8622天津/optionoption value=8623重慶/optionoption value=86311河北/optionoption value=8625江蘇/optionoption value=86571浙江/optionoption value=8620廣東/optionoption value=86351山西/optionoption value=8624遼寧/optionoption value=86431吉林/optionoption value=86451黑龍江/optionoption value=86551安徽/optionoption value=86591福建/optionoption value=86791江西/optionoption value=86531山東/optionoption value=86371河南/optionoption value=8627湖北/optionoption value=86731 selected湖南/optionoption value=8628四川/optionoption value=86851貴州/optionoption value=86871云南/optionoption value=8629陜西/optionoption value=86931甘肅/optionoption value=86971青海/optionoption value=86471內(nèi)蒙古/optionoption value=86771廣西/optionoption value=86898海南/optionoption value=86891西藏/optionoption value=86951寧夏/optionoption value=86991新疆/optionoption value=88610臺(tái)灣/optionoption value=85210香港/optionoption value=85310澳門/option/SELECT

選擇城市:

SELECT name=locid

OPTION value=86731731長(zhǎng)沙/OPTIONOPTION value=86731730岳陽/OPTIONOPTION value=86731732湘潭/OPTIONOPTION value=86731733株洲/OPTIONOPTION value=86731734衡陽/OPTIONOPTION value=86731735郴州/OPTIONOPTION value=86731736常德/OPTIONOPTION value=86731737益陽/OPTIONOPTION value=86731738婁底/OPTIONOPTION value=86731739邵陽/OPTIONOPTION value=86731743 selected吉首/OPTIONOPTION value=86731745懷化/OPTIONOPTION value=86731746永州/OPTION

/SELECT

/DIV

script

function cls_inpt(){

var _inpt=document.getElementsByTagName("input");

for(var i=0;i_inpt.length;i++){

if(_inpt[i].name.indexOf('stockid')=0 ||_inpt[i].name.indexOf('showname')=0 ||_inpt[i].name.indexOf('stockname')=0){

_inpt[i].value='';

}

}

return false;

}

cityarray0 = new Array(

"0;不預(yù)定");

cityarray8610 = new Array(

"861010;北京");

cityarray8621 = new Array(

"862121;上海");

cityarray8622 = new Array(

"862222;天津");

cityarray8623 = new Array(

"862323;重慶",

"86232314;萬州",

"8623810;涪陵");

cityarray86311 = new Array(

"86311311;石家莊",

"86311310;邯鄲",

"86311312;保定",

"86311313;張家口",

"86311314;承德",

"86311315;唐山",

"86311316;廊坊",

"86311317;滄州",

"86311318;衡水",

"86311319;邢臺(tái)",

"86311335;秦皇島");

cityarray8625 = new Array(

"862525;南京",

"8625510;無錫",

"8625511;鎮(zhèn)江",

"8625512;蘇州",

"8625513;南通",

"8625514;揚(yáng)州",

"8625515;鹽城",

"8625516;徐州",

"8625517;淮安",

"862551701;淮陰",

"8625518;連云港",

"8625519;常州",

"8625523;泰州",

"8625527;宿遷");

cityarray86571 = new Array(

"86571571;杭州",

"86571570;衢州",

"86571572;湖州",

"86571573;嘉興",

"86571574;寧波",

"86571575;紹興",

"86571576;臺(tái)州",

"86571577;溫州",

"86571578;麗水",

"86571579;金華",

"86571580;舟山");

cityarray8620 = new Array(

"862020;廣州",

"8620660;汕尾",

"8620662;陽江",

"8620663;揭陽",

"8620668;茂名",

"8620750;江門",

"8620751;韶關(guān)",

"8620752;惠州",

"8620753;梅州",

"8620754;汕頭",

"8620755;深圳",

"8620756;珠海",

"8620757;佛山",

"8620758;肇慶",

"8620759;湛江",

"8620760;中山",

"8620762;河源",

"8620763;清遠(yuǎn)",

"8620766;云浮",

"8620768;潮州",

"8620769;東莞");

cityarray86351 = new Array(

"86351351;太原",

"86351349;朔州",

"86351350;忻州",

"86351352;大同",

"86351353;陽泉",

"86351354;榆次",

"86351355;長(zhǎng)治",

"86351356;晉城",

"86351357;臨汾",

"86351358;呂梁",

"86351359;運(yùn)城");

cityarray8624 = new Array(

"862424;沈陽",

"8624410;鐵嶺",

"8624411;大連",

"8624412;鞍山",

"8624413;撫順",

"8624414;本溪",

"8624415;丹東",

"8624416;錦州",

"8624417;營(yíng)口",

"8624418;阜新",

"1378819;遼陽",

"8624421;朝陽",

"8624427;盤錦",

"8624429;葫蘆島");

cityarray86431 = new Array(

"86431431;長(zhǎng)春",

"86431432;吉林",

"86431434;四平",

"86431435;通化",

"86431436;白城",

"86431437;遼源",

"86431438;松原",

"86431439;白山");

cityarray86451 = new Array(

"86451451;哈爾濱",

"86451452;齊齊哈爾",

"86451453;牡丹江",

"86451454;佳木斯",

"86451455;綏化",

"86451456;黑河",

"86451458;伊春",

"86451459;大慶",

"86451464;七臺(tái)河",

"86451467;雞西",

"86451468;鶴崗",

"86451469;雙鴨山",

"86451470;大興安嶺");

cityarray86551 = new Array(

"86551551;合肥",

"86551550;滁州",

"86551552;蚌埠",

"86551553;蕪湖",

"86551554;淮南",

"86551555;馬鞍山",

"86551556;安慶",

"86551557;宿州",

"86551558;阜陽",

"8655155801;亳州",

"86551559;黃山",

"86551561;淮北",

"86551562;銅陵",

"86551563;宣城",

"86551564;六安",

"86551565;巢湖",

"86551566;池州");

cityarray86591 = new Array(

"86591591;福州",

"86591592;廈門",

"86591593;寧德",

"86591594;莆田",

"86591595;泉州",

"86591596;漳州",

"86591597;龍巖",

"86591598;三明",

"86591599;南平");

cityarray86791 = new Array(

"86791791;南昌",

"86791701;鷹潭",

"86791790;新余",

"86791792;九江",

"86791793;上饒",

"86791794;撫州",

"86791795;宜春",

"86791796;吉安",

"86791797;贛州",

"86791798;景德鎮(zhèn)",

"86791799;萍鄉(xiāng)");

cityarray86531 = new Array(

"86531531;濟(jì)南",

"86531530;菏澤",

"86531532;青島",

"86531533;淄博",

"86531534;德州",

"86531535;煙臺(tái)",

"86531536;濰坊",

"86531537;濟(jì)寧",

"86531539;臨沂",

"86531543;濱州",

"86531546;東營(yíng)",

"86531631;威海",

"86531632;棗莊",

"86531633;日照",

"86531634;萊蕪",

"86531635;聊城");

cityarray86371 = new Array(

"86371371;鄭州",

"86371370;商丘",

"86371372;安陽",

"86371373;新鄉(xiāng)",

"86371374;許昌",

"86371375;平頂山",

"86371376;信陽",

"86371377;南陽",

"86371378;開封",

"86371379;洛陽",

"86371391;焦作",

"86371392;鶴壁",

"86371393;濮陽",

"86371394;周口",

"86371395;漯河",

"86371396;駐馬店",

"86371398;三門峽");

cityarray8627 = new Array(

"862727;武漢",

"8627710;襄樊",

"8627711;鄂州",

"8627712;孝感",

"8627713;黃岡",

"8627714;黃石",

"8627715;咸寧",

"8627716;荊州",

"8627717;宜昌",

"8627718;恩施",

"8627719;十堰",

"8627722;隨州",

"8627724;荊門");

cityarray86731 = new Array(

"86731731;長(zhǎng)沙",

"86731730;岳陽",

"86731732;湘潭",

"86731733;株洲",

"86731734;衡陽",

"86731735;郴州",

"86731736;常德",

"86731737;益陽",

"86731738;婁底",

"86731739;邵陽",

"86731743;吉首",

"86731745;懷化",

"86731746;永州");

cityarray8628 = new Array(

"862828;成都",

"8628812;攀枝花",

"8628813;自貢",

"8628816;綿陽",

"8628817;南充",

"8628818;達(dá)州",

"8628825;遂寧",

"8628826;廣安",

"8628827;巴中",

"8628830;瀘州",

"8628831;宜賓",

"8628832;資陽",

"862883201;內(nèi)江",

"8628833;樂山",

"862883301;眉山",

"862883401;涼山",

"8628835;雅安",

"862883701;阿壩",

"8628838;德陽",

"8628839;廣元");

cityarray86851 = new Array(

"86851851;貴陽",

"86851852;遵義",

"86851853;安順",

"86851854;都勻",

"86851855;凱里",

"86851856;銅仁",

"86851857;畢節(jié)",

"86851858;六盤水",

"86851859;興義");

cityarray86871 = new Array(

"86871871;昆明",

"86871691;西雙版納",

"86871692;德宏",

"86871870;昭通",

"86871872;大理",

"8687187303;紅河",

"86871874;曲靖",

"86871875;保山",

"86871876;文山",

"86871877;玉溪",

"86871878;楚雄",

"86871879;思茅",

"86871883;臨滄",

"8687188601;怒江",

"8687188701;迪慶",

"86871888;麗江");

cityarray8629 = new Array(

"862929;西安",

"8629910;咸陽",

"8629911;延安",

"8629912;榆林",

"8629913;渭南",

"8629914;商洛",

"8629915;安康",

"8629916;漢中",

"8629917;寶雞",

"8629919;銅川");

cityarray86931 = new Array(

"86931931;蘭州",

"86931930;臨夏",

"86931932;定西",

"86931933;平?jīng)?,

"86931934;慶陽",

"86931935;金昌",

"8693193501;武威",

"86931936;張掖",

"86931937;酒泉",

"8693193701;嘉峪關(guān)",

"86931938;天水",

"86931939;隴南",

"86931941;甘南",

"86931943;白銀");

cityarray86971 = new Array(

"86971971;西寧",

"8697197001;海北",

"86971972;海東",

"8697197501;果洛",

"8697197301;黃南",

"86971976;玉樹",

"86971979;格爾木",

"8697197901;海西");

cityarray86471 = new Array(

"86471471;呼和浩特",

"86471470;海拉爾",

"86471472;包頭",

"86471473;烏海",

"86471474;集寧",

"86471475;通遼",

"86471476;赤峰",

"86471478;臨河",

"86471479;錫林浩特",

"86471482;烏蘭浩特",

"86471483;巴彥浩特",

"86471484;鄂爾多斯");

cityarray86771 = new Array(

"86771771;南寧",

"86771770;防城港",

"8677177101;崇左",

"86771772;柳州",

"8677177201;來賓",

"86771773;桂林",

"86771774;梧州",

"8677177401;賀州",

"86771775;玉林",

"8677177501;貴港",

"86771776,;百色",

"86771777,;欽州",

"86771778,;河池",

"86771779,;北海");

cityarray86898 = new Array(

"86898898;???,

"86898899;三亞",

"8689889901;西沙群島");

cityarray86891 = new Array(

"86891891;拉薩",

"86891892;日喀則",

"86891893;山南",

"86891894;林芝",

"86891895;昌都",

"86891896;那曲",

"86891897;阿里");

cityarray86951 = new Array(

"86951951;銀川",

"86951952;石嘴山",

"86951953;吳忠",

"86951954;固原");

cityarray86991 = new Array(

"86991991;烏魯木齊",

"86991901;塔城",

"86991902;哈密",

"86991903;和田",

"86991906;阿勒泰",

"8699190801;克州",

"86991909;博樂",

"86991990;克拉瑪依",

"86991993;石河子",

"86991994;昌吉",

"86991995;吐魯番",

"86991996;庫爾勒",

"86991997;阿克蘇",

"86991998;喀什",

"86991999;伊犁");

cityarray88610 = new Array(

"8861010;臺(tái)北");

cityarray85210 = new Array(

"8521010;香港");

cityarray85310 = new Array(

"8531010;澳門");

function getCitiesFromProvinceID(provinceid) {

if (provinceid == 0) return cityarray0;

if (provinceid == 8610) return cityarray8610;

if (provinceid == 8621) return cityarray8621;

if (provinceid == 8622) return cityarray8622;

if (provinceid == 8623) return cityarray8623;

if (provinceid == 86311) return cityarray86311;

if (provinceid == 8625) return cityarray8625;

if (provinceid == 86571) return cityarray86571;

if (provinceid == 8620) return cityarray8620;

if (provinceid == 86351) return cityarray86351;

if (provinceid == 8624) return cityarray8624;

if (provinceid == 86431) return cityarray86431;

if (provinceid == 86451) return cityarray86451;

if (provinceid == 86551) return cityarray86551;

if (provinceid == 86591) return cityarray86591;

if (provinceid == 86791) return cityarray86791;

if (provinceid == 86531) return cityarray86531;

if (provinceid == 86371) return cityarray86371;

if (provinceid == 8627) return cityarray8627;

if (provinceid == 86731) return cityarray86731;

if (provinceid == 8628) return cityarray8628;

if (provinceid == 86851) return cityarray86851;

if (provinceid == 86871) return cityarray86871;

if (provinceid == 8629) return cityarray8629;

if (provinceid == 86931) return cityarray86931;

if (provinceid == 86971) return cityarray86971;

if (provinceid == 86471) return cityarray86471;

if (provinceid == 86771) return cityarray86771;

if (provinceid == 86898) return cityarray86898;

if (provinceid == 86891) return cityarray86891;

if (provinceid == 86951) return cityarray86951;

if (provinceid == 86991) return cityarray86991;

if (provinceid == 88610) return cityarray88610;

if (provinceid == 85210) return cityarray85210;

if (provinceid == 85310) return cityarray85310;

return new Array();

}

function fillInCities(provinceid) {

document.forms['personalorder']['locid'].length = 0;

var arr = getCitiesFromProvinceID(provinceid);

var cnt = 0;

var isSelected = false;

for(var n=0; narr.length; n++){

newOpt=new Option;

i = arr[n].search(';');

newOpt.text=arr[n].slice(i+1);

newOpt.value=arr[n].slice(0,i);

if (!isSelected){

//newOpt.selected = true;

isSelected = true;

}

document.forms['personalorder']['locid'].options[cnt]=newOpt;

cnt=cnt+1;

}

}

function GetSelectedText(box){

var boxText = '';

for(var i=0; ibox.options.length; i++){

if(box.options[i].selected box.options[i].value != ''){

boxText = box.options[i].value;

}

}

return boxText;

}

function setInd(box) {

ind = GetSelectedText(box);

if(ind != ''){

fillInCities(ind);

}

//alert(ind);

}

/script

/TD

/TR

/TBODY

/TABLE

/body

/html


文章名稱:省市javascript的簡(jiǎn)單介紹
標(biāo)題路徑:http://weahome.cn/article/dsdppih.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部