基本完成,有bug
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
<div>
|
||||
<form>
|
||||
省份:
|
||||
<select name="province" id="province" onchange="showCity()">
|
||||
<select name="province" id="province">
|
||||
<option value="0">--请选择--</option>
|
||||
</select> 城市:
|
||||
<select name="city" id="city" onchange="showArea()">
|
||||
<select name="city" id="city">
|
||||
<option value="0">--请选择--</option>
|
||||
</select> 地区:
|
||||
<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>
|
Reference in New Issue
Block a user