广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 17409 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
阿科 手机 葫芦墩家族
数位造型
个人文章 个人相簿 个人日记 个人地图
社区建设奖
特约版主
级别: 特约版主 该用户目前不上站
版区: 星侨五术软体
推文 x0 鲜花 x10
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[JScript][教学] [范例]实用的邮递区号、地址表单
复制程式
<script language="JavaScript">
<!--
//==================== for zip code begin =========================
County = new Array( "台北市","基隆市","台北县","宜兰县","新竹市","新竹县","桃园县","苗栗县",
                                   "台中市","台中县","彰化县","南投县","嘉义市","嘉义县","云林县","台南市",
                                   "台南县","高雄市","高雄县","澎湖县","屏东县","台东县","花莲县","金门县",
                                   "连江县","南海诸岛","钓鱼台列屿","外国");//全省各县市
Zone = new Array(28);
Zone[0] = new Array("中正区","大同区","中山区","松山区","大安区","万华区","信义区","士林区",
                                   "北投区","内湖区","南港区","文山区");//台北市
Zone[1] = new Array("仁爱区","信义区","中正区","中山区","安乐区","暖暖区","七堵区");//基隆市
Zone[2] = new Array("万里乡","金山乡","板桥市","汐止市","深坑乡","石碇乡","瑞芳镇","平溪乡",
                                   "双溪乡","贡寮乡","新店市","坪林乡","乌来乡","永和市","中和市","土城市",
                                   "三峡镇","树林市","莺歌镇","三重市","新庄市","泰山乡","林口乡","芦洲市",
                                   "五股乡","八里乡","淡水镇","三芝乡","石门乡");//台北县
Zone[3] = new Array("宜兰市","头城镇","礁溪乡","壮围乡","员山乡","罗东镇","三星乡","大同乡",
                                   "五结乡","冬山乡","苏澳镇","南澳乡");//宜兰县
Zone[4] = new Array("");//新竹市
Zone[5] = new Array("竹北市","湖口乡","新丰乡","新埔乡","关西镇","芎林乡","宝山乡","竹东镇",
                                   "五峰乡","横山乡","尖石乡","北埔乡","峨嵋乡");//新竹县
Zone[6] = new Array("中坜市","平镇市","龙潭乡","杨梅镇","新屋乡","观音乡","桃园市","龟山乡",
                                   "八德市","大溪镇","复兴乡","大园乡","芦竹乡");//桃园县
Zone[7] = new Array("竹南镇","头份镇","三湾乡","南庄乡","狮潭乡","后龙镇","通霄镇","苑里镇",
                                   "苗栗市","造桥乡","头屋乡","公馆乡","大湖乡","泰安乡","鉰锣乡","三义乡",
                                   "西湖乡","卓兰乡");//苗栗县
Zone[8] = new Array("中区","东区","南区","西区","北区","北屯区","西屯区","南屯区");//台中市
Zone[9] = new Array("太平市","大里市","雾峰乡","乌日乡","丰原市","后里乡","石冈乡","东势镇",
                                   "和平乡","新社乡","潭子乡","大雅乡","神冈乡","大肚乡","沙鹿镇","龙井乡",
                                   "梧栖镇","清水镇","大甲镇","外圃乡","大安乡");//台中县
Zone[10]= new Array("彰化市","芬园乡","花坛乡","秀水乡","鹿港镇","福兴乡","线西乡","和美镇",
                                   "伸港乡","员林镇","社头乡","永靖乡","埔心乡","溪湖镇","大村乡","埔盐乡",
                                   "田中镇","北斗镇","田尾乡","埤头乡","溪州乡","竹塘乡","二林镇","大城乡",
                                   "芳苑乡","二水乡");//彰化县
Zone[11]= new Array("南投市","中寮乡","草屯镇","国姓乡","埔里镇","仁爱乡","名间乡","集集乡",
                                   "水里乡","鱼池乡","信义乡","竹山镇","鹿谷乡");//南投县
Zone[12]= new Array("");//嘉义市
Zone[13]= new Array("番路乡","梅山乡","竹崎乡","阿里山","中埔乡","大埔乡","水上乡","鹿草乡",
                                   "太保市","朴子市","东石乡","六脚乡","新港乡","民雄乡","大林镇","汉口乡",
                                   "义竹乡","布袋镇");//嘉义县
Zone[14]= new Array("斗南市","大埤乡","虎尾镇","土库镇","褒忠乡","东势乡","台西乡","仑背乡",
                                   "麦寮乡","斗六市","林内乡","古坑乡","莿桐乡","西螺镇","二仑乡","北港镇",
                                   "水林乡","口湖乡","四湖乡","元长乡");//云林县
Zone[15]= new Array("中区","东区","南区","西区","北区","安平区","安南区");//台南市
Zone[16]= new Array("永康市","归仁乡","新化镇","左镇乡","玉井乡","楠西乡","南化乡","仁德乡",
                                   "关庙乡","龙崎乡","官田乡","麻豆镇","佳里镇","西港乡","七股乡","将军乡",
                                   "学甲镇","北门乡","新营市","后壁乡","白河镇","东山乡","六甲乡","下营乡",
                                   "柳营乡","盐水镇","善化镇","大内乡","山上乡","新市乡","安定乡");//台南县
Zone[17]= new Array("新兴区","前金区","苓雅区","盐埕区","鼓山区","旗津区","前镇区","三民区",
                                   "楠梓区","小港区","左营区");//高雄市
Zone[18]= new Array("仁武乡","大社乡","冈山镇","路竹乡","阿莲乡","田寮乡","燕巢乡","桥头乡",
                                   "梓官乡","弥陀乡","永安乡","湖内乡","凤山市","大寮乡","林园乡","鸟松乡",
                                   "大树乡","旗山镇","美浓镇","六龟乡","内门乡","杉林乡","甲仙乡","桃源乡",
                                   "三民乡","茂林乡","茄萣乡");//高雄县
Zone[19]= new Array("马公市","西屿乡","望安乡","七美乡","白沙乡","湖西乡");//澎湖县
Zone[20]= new Array("屏东市","三地门","雾台乡","玛家乡","九如乡","里港乡","高树乡","盐埔乡",
                                   "长治乡","麟洛乡","竹田乡","内埔乡","万丹乡","潮州镇","泰武乡","来义乡",
                                   "万峦乡","嵌顶乡","新埤乡","南州乡","林边乡","东港镇","琉球乡","佳冬乡",
                                   "新园乡","枋寮乡","枋山乡","春日乡","狮子乡","车城乡","牡丹乡","恒春镇",
                                   "满州乡");//屏东县
Zone[21]= new Array("台东市","绿岛乡","兰屿乡","延平乡","卑南乡","鹿野乡","关山镇","海端乡",
                                   "池上乡","东河乡","成氐燡","长滨乡","太麻里","金峰乡","大武乡","达仁乡");//台东县
Zone[22]= new Array("花莲市","新城乡","秀林乡","吉安乡","寿丰乡","凤林镇","光复乡","丰滨乡",
                                   "瑞穗乡","万荣乡","玉里镇","卓溪乡","富里乡");//花莲县
Zone[23]= new Array("金沙镇","金湖镇","金宁乡","金城镇","烈屿乡","乌丘乡");//金门县
Zone[24]= new Array("南竿乡","北竿乡","莒光乡","东引");//连江县
Zone[25]= new Array("东沙","西沙");//南海诸岛
Zone[26]= new Array("");//钓鱼台列屿
Zone[27]= new Array("");//外国
ZipCode = new Array(28);
ZipCode[0] = new Array("100","103","104","105","106","108","110","111","112","114","115","116");//台北市
ZipCode[1] = new Array("200","201","202","203","204","205","206");//基隆市
ZipCode[2] = new Array("207","208","220","221","222","223","224","226","227","228","231","232","233","234","235","236","237","238","239","241","242","243","244","247","248","249","251","252","253");//台北县
ZipCode[3] = new Array("260","261","262","263","264","265","266","267","268","269","270","272");//宜兰县
ZipCode[4] = new Array("300");//新竹市
ZipCode[5] = new Array("302","303","304","305","306","307","308","310","311","312","313","314","315");//新竹县
ZipCode[6] = new Array("320","324","325","326","327","328","330","333","334","335","336","337","338");//桃园县
ZipCode[7] = new Array("350","351","352","353","354","356","357","358","360","361","362","363","364","365","366","367","368","369");//苗栗县
ZipCode[8] = new Array("400","401","402","403","404","406","407","408");//台中市
ZipCode[9] = new Array("411","412","413","414","420","421","422","423","424","426","427","428","429","432","433","434","435","436","437","438","439");//台中县
ZipCode[10] = new Array("500","502","503","504","505","506","507","508","509","510","511","5112","513","514","515","516","520","521","522","523","524","525","526","527","528","530");//彰化县
ZipCode[11] = new Array("540","541","542","544","545","546","551","552","553","555","556","557","558");//南投县
ZipCode[12] = new Array("600");//嘉义市
ZipCode[13] = new Array("602","603","604","605","606","607","608","611","612","613","614","615","616","621","622","623","624","625");//嘉义县
ZipCode[14] = new Array("630","631","632","633","634","635","636","637","638","640","643","646","647","648","649","651","652","653","654","655");//云林县
ZipCode[15] = new Array("700","701","702","703","704","708","709");//台南市
ZipCode[16] = new Array("710","711","712","713","714","715","716","717","718","719","720","721","722","723","724","725","726","727","730","731","732","733","734","735","736","737","741","742","743","744","745");//台南县
ZipCode[17] = new Array("800","801","802","803","804","805","806","807","811","812","813");//高雄市
ZipCode[18] = new Array("814","815","820","821","822","823","824","825","826","827","828","829","830","831","832","833","840","842","843","844","845","846","847","848","849","851","852");//高雄县
ZipCode[19] = new Array("880","881","882","883","884","885");//澎湖县
ZipCode[20] = new Array("900","901","902","903","904","905","906","907","908","909","911","912","913","920","921","922","923","924","925","926","927","928","929","931","932","940","941","942","943","944","945","946","947");//屏东县
ZipCode[21] = new Array("950","951","952","953","954","955","956","957","958","959","961","962","963","964","965","966");
ZipCode[22] = new Array("970","971","972","973","974","975","976","977","978","979","981","982","983");//花莲县
ZipCode[23] = new Array("890","891","892","893","894","896");//金门县
ZipCode[24] = new Array("209","210","211","212");//连江县
ZipCode[25] = new Array("817","819","290");//南海诸岛
ZipCode[26] = new Array("290");//钓鱼台列屿
ZipCode[27] = new Array(" ");//外国

function initCounty(countyInput) {
       countyInput.length = County.length;
       for (i = 0; i < County.length; i++) {
              countyInput.options[ i ].value = County[ i ];
              countyInput.options[ i ].text = County[ i ];
       }
       countyInput.selectedIndex = 0;
}

function initZone(countyInput, zoneInput, post){
       changeZone(countyInput, zoneInput, post);
}

function changeZone(countyInput, zoneInput, post) {
       selectedCountyIndex = countyInput.selectedIndex;

       zoneInput.length = Zone[selectedCountyIndex].length;
       for (i = 0; i < Zone[selectedCountyIndex].length; i++) {
              zoneInput.options[ i ].value = Zone[selectedCountyIndex][ i ];
              zoneInput.options[ i ].text = Zone[selectedCountyIndex][ i ];
              if (zoneInput.options[ i ].text == "松山区")
                     zoneInput.options[ i ].selected = true;
       }
       //zoneInput.selectedIndex = 0;       

       showZipCode(countyInput, zoneInput, post);
}

function showZipCode(countyInput, zoneInput, post) {
       post.value = ZipCode[countyInput.selectedIndex][zoneInput.selectedIndex];
}

function showZone(countyInput,zoneInput,post){
var k=0;l=0;
for (i=0; i < ZipCode.length; i++) {
       for (j=0; j < ZipCode[ i ].length; j++) {
              if ( post == ZipCode[ i ][j] ) {                     
                     countyInput.length = County.length;                     
                     for (k = 0; k < countyInput.length; k++) {
                            countyInput.options[k].value = County[k];
                            countyInput.options[k].text = County[k];
                            if (County[k] == County[ i ]) {
                                   countyInput.options[k].selected = true;
                            }
                     }

                     zoneInput.length = Zone[ i ].length;
                     for (l = 0; l < zoneInput.length; l++) {
                            zoneInput.options[l].value = Zone[ i ][l];
                            zoneInput.options[l].text = Zone[ i ][l];
                            if (zoneInput.options[l].text == Zone[ i ][j]) {
                                   zoneInput.options[l].selected = true;
                            }
                     }
                     return;
              }
     }
}
//       alert(k+'无此邮递区号'+l);post=飁'ResetAll();return;
}

function showZone1(post){//邮递区号 转 地名
for (i=0; i < ZipCode.length; i++) {
       for (j=0; j < ZipCode[ i ].length; j++) {
              if ( post == ZipCode[ i ][j] ) {                     
                     document.write(County[ i ]+Zone[ i ][j]);return;
              }
       }
}
}
//==================== for zip code end =========================
-->
</script>
</head>
<body bgcolor="#FFFFFF" topmargin="0" marginwidth="0" marginheight="0">
<form method="post" action="" name="mgr" >
<table>
       <tr> 
              <td nowrap colspan="4"><font color="#0000CC">地  址:</font>
              <input type="text" name="PostNo" value="105" size="2" onChange='showZone(mgr.City, mgr.Canton, mgr.PostNo.value)'>
              <select name=City onChange="changeZone(mgr.City, mgr.Canton, mgr.PostNo)" size=1>
              </select>
              <select name=Canton onChange="showZipCode(mgr.City, mgr.Canton, mgr.PostNo)" size=1>
              </select>
              <input maxlength="150" type="text" name="Address" value="" size=34>
              </td>
       </tr>
</table>
<script language="JavaScript">
       post="105";showZone(mgr.City, mgr.Canton,post);
</script>
  </form>
</body>
</html> 



献花 x0 回到顶端 [楼 主] From:台湾 | Posted:2002-10-10 14:55 |

头像
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: *
推文 x 鲜花 x
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

感谢分享 ^_^ 很实用...多一个邮递区号查询
===========================
为男女论坛推人气~~~推推推唷


献花 x0 回到顶端 [1 楼] 未知地址 | Posted:2003-08-02 07:09 |
rurihome
数位造型
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

好像有错误的地名耶

还有文档似乎也不完整说

可否补一下呀


献花 x1 回到顶端 [2 楼] From:未知地址 | Posted:2004-02-20 03:05 |
dicklee
数位造型
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x0
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

不错的小script ,但贴上时多了/,少了些标签,应为下列所示:


复制程式
<html>
<head>

<script language="JavaScript"> 
<!-- 
//==================== for zip code begin ========================= 
County = new Array("台北市","基隆市","台北县","宜兰县","新竹市","新竹县","桃园县","苗栗县","台中市","台中县","彰化县","南投县","嘉义市","嘉义县","云林县","台南市","台南县","高雄市","高雄县","澎湖县","屏东县","台东县","花莲县","金门县","连江县","南海诸岛","钓鱼台列屿","外国");//全省各县市 
Zone = new Array(28); 
Zone[0] = new Array("中正区","大同区","中山区","松山区","大安区","万华区","信义区","士林区","北投区","内湖区","南港区","文山区(木栅)","文山区(景美)");//台北市 
Zone[1] = new Array("仁爱区","信义区","中正区","中山区","安乐区","暖暖区","七堵区");//基隆市 
Zone[2] = new Array("万里乡","金山乡","板桥市","汐止市","深坑乡","石碇乡","瑞芳镇","平溪乡","双溪乡","贡寮乡","新店市","坪林乡","乌来乡","永和市","中和市","土城市","三峡镇","树林市","莺歌镇","三重市","新庄市","泰山乡","林口乡","芦洲市","五股乡","八里乡","淡水镇","三芝乡","石门乡");//台北县 
Zone[3] = new Array("宜兰市","头城镇","礁溪乡","壮围乡","员山乡","罗东镇","三星乡","大同乡","五结乡","冬山乡","苏澳镇","南澳乡");//宜兰县 
Zone[4] = new Array("");//新竹市 
Zone[5] = new Array("竹北市","湖口乡","新丰乡","新埔乡","关西镇","芎林乡","宝山乡","竹东镇","五峰乡","横山乡","尖石乡","北埔乡","峨嵋乡");//新竹县 
Zone[6] = new Array("中坜市","平镇","龙潭乡","杨梅镇","新屋乡","观音乡","桃园市","龟山乡","八德市","大溪镇","复兴乡","大园乡","芦竹乡");//桃园县 
Zone[7] = new Array("竹南镇","头份镇","三湾乡","南庄乡","狮潭乡","后龙镇","通霄镇","苑里镇","苗栗市","造桥乡","头屋乡","公馆乡","大湖乡","泰安乡","鉰锣乡","三义乡","西湖乡","卓兰乡");//苗栗县 
Zone[8] = new Array("中区","东区","南区","西区","北区","北屯区","西屯区","南屯区");//台中市 
Zone[9] = new Array("太平市","大里市","雾峰乡","乌日乡","丰原市","后里乡","石冈乡","东势镇","和平乡","新社乡","潭子乡","大雅乡","神冈乡","大肚乡","沙鹿镇","龙井乡","梧栖镇","清水镇","大甲镇","外圃乡","大安乡");//台中县 
Zone[10] = new Array("彰化市","芬园乡","花坛乡","秀水乡","鹿港镇","福兴乡","线西乡","和美镇","伸港乡","员林镇","社头乡","永靖乡","埔心乡","溪湖镇","大村乡","埔盐乡","田中镇","北斗镇","田尾乡","埤头乡","溪州乡","竹塘乡","二林镇","大城乡","芳苑乡","二水乡");//彰化县 
Zone[11] = new Array("南投市","中寮乡","草屯镇","国姓乡","埔里镇","仁爱乡","名间乡","集集乡","水里乡","鱼池乡","信义乡","竹山镇","鹿谷乡");//南投县 
Zone[12] = new Array("");//嘉义市 
Zone[13] = new Array("番路乡","梅山乡","竹崎乡","阿里山乡","中埔乡","大埔乡","水上乡","鹿草乡","太保市","朴子市","东石乡","六脚乡","新港乡","民雄乡","大林镇","汉口乡","义竹乡","布袋镇");//嘉义县 
Zone[14] = new Array("斗南市","大埤乡","虎尾镇","土库镇","褒忠乡","东势乡","台西乡","仑背乡","麦寮乡","斗六市","林内乡","古坑乡","莿桐乡","西螺镇","二仑乡","北港镇","水林乡","口湖乡","四湖乡","元长乡");//云林县 
Zone[15] = new Array("中区","东区","南区","西区","北区","安平区","安南区");//台南市 
Zone[16] = new Array("永康市","归仁乡","新化镇","左镇乡","玉井乡","楠西乡","南化乡","仁德乡","关庙乡","龙崎乡","官田乡","麻豆镇","佳里镇","西港乡","七股乡","将军乡","学甲镇","北门乡","新营市","后壁乡","白河镇","东山乡","六甲乡","下营乡","柳营乡","盐水镇","善化镇","大内乡","山上乡","新市乡","安定乡");//台南县 
Zone[17] = new Array("新兴区","前金区","苓雅区","盐埕区","鼓山区","旗津区","前镇区","三民区","楠梓区","小港区","左营区");//高雄市 
Zone[18] = new Array("仁武乡","大社乡","冈山镇","路竹乡","阿莲乡","田寮乡","燕巢乡","桥头乡","梓官乡","弥陀乡","永安乡","湖内乡","凤山市","大寮乡","林园乡","鸟松乡","大树乡","旗山镇","美浓镇","六龟乡","内门乡","杉林乡","甲仙乡","桃源乡","三民乡","茂林乡","茄萣乡");//高雄县 
Zone[19] = new Array("马公市","西屿乡","望安乡","七美乡","白沙乡","湖西乡");//澎湖县 
Zone[20] = new Array("屏东市","三地门乡","雾台乡","玛家乡","九如乡","里港乡","高树乡","盐埔乡","长治乡","麟洛乡","竹田乡","内埔乡","万丹乡","潮州镇","泰武乡","来义乡","万峦乡","嵌顶乡","新埤乡","南州乡","林边乡","东港镇","琉球乡","佳冬乡","新园乡","枋寮乡", "枋山乡","春日乡","狮子乡","车城乡","牡丹乡","恒春镇","满州乡");//屏东县 
Zone[21] = new Array("台东市","绿岛乡","兰屿乡","延平乡","卑南乡","鹿野乡","关山镇","海端乡","池上乡","东河乡","成氐","长滨乡","太麻里乡","金峰乡","大武乡","达仁乡");//台东县 
Zone[22] = new Array("花莲市","新城乡","秀林乡","吉安乡","寿丰乡","凤林镇","光复乡","丰滨乡","瑞穗乡","万荣乡","玉里镇","卓溪乡","富里乡");//花莲县 
Zone[23] = new Array("金沙镇","金湖镇","金宁乡","金城镇","烈屿乡","乌丘乡");//金门县 
Zone[24] = new Array("南竿乡","北竿乡","莒光乡","东引");//连江县 
Zone[25] = new Array("东沙","西沙");//南海诸岛 
Zone[26] = new Array("");//钓鱼台列屿 
Zone[27] = new Array("");//外国 
ZipCode = new Array(28); 
ZipCode[0] = new Array("100","103","104","105","106","108","110","111","112","114","115","116","117");//台北市 
ZipCode[1] = new Array("200","201","202","203","204","205","206");//基隆市 
ZipCode[2] = new Array("207","208","220","221","222","223","224","226","227","228","231","232","233","234","235","236","237","238","239","241","242","243","244","247","248","249","251","252","253");//台北县 
ZipCode[3] = new Array("260","261","262","263","264","265","266","267","268","269","270","272");//宜兰县 
ZipCode[4] = new Array("300");//新竹市 
ZipCode[5] = new Array("302","303","304","305","306","307","308","310","311","312","313","314","315");//新竹县 
ZipCode[6] = new Array("320","324","325","326","327","328","330","333","334","335","336","337","338");//桃园县 
ZipCode[7] = new Array("350","351","352","353","354","356","357","358","360","361","362","363","364","365","366","367","368","369");//苗栗县 
ZipCode[8] = new Array("400","401","402","403","404","406","407","408");//台中市 
ZipCode[9] = new Array("411","412","413","414","420","421","422","423","424","426","427","428","429","432","433","434","435","436","437","438","439");//台中县 
ZipCode[10] = new Array("500","502","503","504","505","506","507","508","509","510","511","5112","513","514","515","516","520","521","522","523","524","525","526","527","528","530");//彰化县 
ZipCode[11] = new Array("540","541","542","544","545","546","551","552","553","555","556","557","558");//南投县 
ZipCode[12] = new Array("600");//嘉义市 
ZipCode[13] = new Array("602","603","604","605","606","607","608","611","612","613","614","615","616","621","622","623","624","625");//嘉义县 
ZipCode[14] = new Array("630","631","632","633","634","635","636","637","638","640","643","646","647","648","649","651","652","653","654","655");//云林县 
ZipCode[15] = new Array("700","701","702","703","704","708","709");//台南市 
ZipCode[16] = new Array("710","711","712","713","714","715","716","717","718","719","720","721","722","723","724","725","726","727","730","731","732","733","734","735","736","737","741","742","743","744","745");//台南县 
ZipCode[17] = new Array("800","801","802","803","804","805","806","807","811","812","813");//高雄市 
ZipCode[18] = new Array("814","815","820","821","822","823","824","825","826","827","828","829","830","831","832","833","840","842","843","844","845","846","847","848","849","851","852");//高雄县 
ZipCode[19] = new Array("880","881","882","883","884","885");//澎湖县 
ZipCode[20] = new Array("900","901","902","903","904","905","906","907","908","909","911","912","913","920","921","922","923","924","925","926","927","928","929","931","932","940","941","942","943","944","945","946","947");//屏东县 
ZipCode[21] = new Array("950","951","952","953","954","955","956","957","958","959","961","962","963","964","965","966"); 
ZipCode[22] = new Array("970","971","972","973","974","975","976","977","978","979","981","982","983");//花莲县 
ZipCode[23] = new Array("890","891","892","893","894","896");//金门县 
ZipCode[24] = new Array("209","210","211","212");//连江县 
ZipCode[25] = new Array("817","819","290");//南海诸岛 
ZipCode[26] = new Array("290");//钓鱼台列屿 
ZipCode[27] = new Array(" ");//外国 

function initCounty(countyInput) { 
countyInput.length = County.length; 
for (i = 0; i < County.length; i++) { 
countyInput.options[i].value = County[i]; 
countyInput.options[i].text = County[i]; 
} 
countyInput.selectedIndex = 0; 
} 

function initZone(countyInput, zoneInput, post){ 
changeZone(countyInput, zoneInput, post); 
} 

function changeZone(countyInput, zoneInput, post) { 
selectedCountyIndex = countyInput.selectedIndex; 

zoneInput.length = Zone[selectedCountyIndex].length; 
for (i = 0; i < Zone[selectedCountyIndex].length; i++) { 
zoneInput.options[i].value = Zone[selectedCountyIndex][i]; 
zoneInput.options[i].text = Zone[selectedCountyIndex][i]; 
if (zoneInput.options[i].text == "松山区") 
zoneInput.options[i].selected = true; 
} 
//zoneInput.selectedIndex = 0; 

showZipCode(countyInput, zoneInput, post); 
} 

function showZipCode(countyInput, zoneInput, post) { 
post.value = ZipCode[countyInput.selectedIndex][zoneInput.selectedIndex]; 
} 

function showZone(countyInput,zoneInput,post){ 
var k=0;l=0; 
for (i=0; i < ZipCode.length; i++) { 
for (j=0; j < ZipCode[i].length; j++) { 
if ( post == ZipCode[i][j] ) { 
countyInput.length = County.length; 
for (k = 0; k < countyInput.length; k++) { 
countyInput.options[k].value = County[k]; 
countyInput.options[k].text = County[k]; 
if (County[k] == County[i]) { 
countyInput.options[k].selected = true; 
} 
} 

zoneInput.length = Zone[i].length; 
for (l = 0; l < zoneInput.length; l++) { 
zoneInput.options[l].value = Zone[i][l]; 
zoneInput.options[l].text = Zone[i][l]; 
if (zoneInput.options[l].text == Zone[i][j]) { 
zoneInput.options[l].selected = true; 
} 
} 
return; 
} 
} 
} 
// alert(k+'无此邮递区号'+l);post=飁'ResetAll();return; 
} 

function showZone1(post){//邮递区号 转 地名 
for (i=0; i < ZipCode.length; i++) { 
for (j=0; j < ZipCode[i].length; j++) { 
if ( post == ZipCode[i][j] ) { 
document.write(County[i]+Zone[i][j]);return; 
} 
} 
} 
} 
//==================== for zip code end ========================= 
--> 
</script> 
</head> 
<body bgcolor="#FFFFFF" topmargin="0" marginwidth="0" marginheight="0"> 
<form method="post" action="" name="mgr" > 
<table> 
<tr> 
<td nowrap colspan="4"><font color="#0000CC">地  址

我住汐止故仅改了汐止市


献花 x0 回到顶端 [3 楼] From:台湾 | Posted:2004-02-22 00:37 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.231199 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言