Re: [問題] 選擇了選單的某一選項後,要能出現文字欄位

看板Ajax作者 (nice play!)時間17年前 (2007/11/13 16:14), 編輯推噓0(004)
留言4則, 1人參與, 最新討論串7/8 (看更多)
把上一篇相似的原始碼改成下列這樣: <?php $i = 0; $j = $_GET['id']; $county=array("---請選擇---","基隆市","台北市","台北縣","桃園縣", "新竹市","新竹縣","苗栗縣","台中市","台中縣","彰化縣","南投縣","雲林縣", "嘉義市","嘉義縣","台南市","台南縣","高雄市","高雄縣","屏東縣","宜蘭縣", "花蓮縣","台東縣","澎湖縣","金門縣","連江縣","26","27","28","29","30", "31","不知道要叫什麼縣","33","34"); $nation=array("---請選擇---","日本","韓國","大陸","香港","新加坡", "馬來西亞","泰國","越南","緬甸","柬埔寨","紐西蘭","澳大利亞","美國", "加拿大","英國","法國","德國","西班牙","葡萄牙","義大利","瑞士","希臘", "羅馬","比利時","奧地利","荷蘭"); ?> 或許就能看出端倪吧..@@ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.127.20.190 ※ 編輯: qazsd 來自: 59.127.20.190 (11/13 16:16)

11/13 16:16, , 1F
我猜可能是陣列長度的關係,而使得前例的第一個選單剛好出現
11/13 16:16, 1F

11/13 16:17, , 2F
兩個叫做"其他"的選項
11/13 16:17, 2F

11/13 16:20, , 3F
因為前例的台灣陣列內存有26個值(包含"---請選擇---")
11/13 16:20, 3F

11/13 16:21, , 4F
而外國陣列存有27個包含"---請選擇---") 且"其他"都不算在內
11/13 16:21, 4F
文章代碼(AID): #17ELpBXI (Ajax)
討論串 (同標題文章)
文章代碼(AID): #17ELpBXI (Ajax)