實現二級地域的選擇,前端大概有兩種表現形式,第一,你是去放上兩個文本框,點擊文本框一的時候,出現省列表,點擊文本框二的時候,出現該省的市區列表;第二種就是放兩個下拉框了,在第一個下拉框選中一個,再到第二個去選中相應的市區,當然還有別的方式,我在這裡就做一種,即下拉選擇的,程式碼如下:
Html程式碼
无标题文档
Originally intended The demonstration uses a loop to generate an array, but think about it, since it is a cascade of secondary regions, it is better to be more standardized, so that everyone can see clearly and the selection is clearer. Although this article is mostly place names... .....