Django/jQuery Cascading Select Boxes?

前端 未结 3 1987
刺人心
刺人心 2020-11-27 14:48

I want to build a Country/State selector. First you choose a country, and the States for that country are displayed in the 2nd select box. Doing that in PHP and jQuery is fa

3条回答
  •  一向
    一向 (楼主)
    2020-11-27 15:13

    Based on Mike's suggestion:

    // the jQuery
    $(function () {
            var $country = $('.country');
            var $provInput = $('.province');
            var $provSelect = $('
                            
        
    提交评论

提交回复
热议问题