12345678910111213141516171819202122232425262728 |
- <%-
- province = '440000'
- city = '440300'
- district = '440305'
- provinces = ChinaCity.list
- cities = ChinaCity.list(province)
- districtes = ChinaCity.list(city)
- %>
- <div class='rails-helper city-group'>
- <%= select_tag :province, options_for_select(provinces, province) , prompt: '--省份--', class: ['city-select', 'city-province'] %>
- <%= select_tag :city , options_for_select(cities, city) , prompt: '--城市--', class: ['city-select', 'city-city'] %>
- <%= select_tag :district, options_for_select(districtes, district), prompt: '--地区--', class: ['city-select', 'city-district'] %>
- </div>
- <div class='html-tag city-group'>
- <select class='city-select city-province'>
- <option>--省份--</option>
- <%= options_for_select(ChinaCity.list, province) %>
- </select>
- <select class='city-select city-city'>
- <option>--城市--</option>
- <%= options_for_select(cities, city) %>
- </select>
- <select class='city-select city-district'>
- <option>--地区--</option>
- <%= options_for_select(districtes, district) %>
- </select>
- </div>
|