基本完成,有bug

This commit is contained in:
2023-05-01 21:33:04 +08:00
parent c41689b828
commit 71d37fac5f
2 changed files with 68 additions and 26 deletions

View File

@@ -13,10 +13,10 @@
<div>
<form>
省份:
<select name="province" id="province" onchange="showCity()">
<select name="province" id="province">
<option value="0">--请选择--</option>
</select>&nbsp;&nbsp; 城市:
<select name="city" id="city" onchange="showArea()">
<select name="city" id="city">
<option value="0">--请选择--</option>
</select>&nbsp;&nbsp; 地区:
<select name="area" id="area">
@@ -28,6 +28,16 @@
<script>
$(function(){
getCountry();
$("#province").change(function(){
CountryId=$("#province").val();
// console.log(FatherId);
getCity(CountryId);
CityID=$("#city").val();
console.log(CityID);
getArea(CityID);
});
})
</script>
</html>