Load Country/State/City

前端 未结 1 1315
春和景丽
春和景丽 2021-01-07 05:22

I have chain of drop down like Country / state and City. Is there is any way to wait until the drop down population then proceed further? like first load the country and the

1条回答
  •  走了就别回头了
    2021-01-07 05:52

    You may do like this

    $('#cb_country').change(function(){
        var id=$(this).val();
        $.get('getCity.php',{id:id},function(data){
            $("#cb_city").html(data);
        });
    });
    

    getCity.php:

    ".$row['CityName']."";
    }
    while($row=mysql_fetch_assoc($Q));
    

    0 讨论(0)
提交回复
热议问题