주 html5 페이지 (main.html
)와 두 개의 다른 html5 페이지 (country.html
및 state.html
)가 있습니다.하나의 html 페이지 드롭 다운 목록을 다른 html 페이지에 사용
country.html
페이지에는 아래와 같이 250 개 국가의 드롭 다운 목록이 있습니다.
<select>
<option value="1">Afghanistan</option>
<option value="2">Albania</option>
.....
<option value="1">Canary Islands</option>
</select>
state.html
main.html
에있는 모든 국가의 드롭 다운 목록 및 국가 드롭 다운 메뉴에서 선택한 국가의 모든 국가의 또 다른 드롭 다운 목록을 표시해야
<select id="1">
<option value="1">Badakhshan</option>
<option value="1">Badghis</option>
............
<option value="32">Zabol</option>
</select>
<select id="2">
<option value="33">Badakhshan</option>
<option value="34">Badghis</option>
............
<option value="68">Vlore</option>
</select>
...............
<select id="250">
<option value="4902">Saba</option>
<option value="4903">Sint Eustatius</option>
............
<option value="4915">Western Equatoria</option>
</select>
아래 같은 250 개국의 상태 선택 드롭 다운 목록이 포함되어 있습니다 명부.
main.html
은 같다
<select id="country">
like to add from country.html
</select>
<select id="state>
like to add from state.html
</select>
내가 country.html
및 state.html
를 사용하려면 있도록 국가와 국가 드롭 다운 목록 5 회 이상을 보여줄 필요가 있기 때문에
클라이언트 측과 서버 측 모두에서 수행 할 수 있습니다. 서버 측에서 수행하는 것은 클라이언트 측에서 수행하는 것보다 덜 복잡합니다. – Dilantha