【发布时间】:2015-03-25 10:45:32
【问题描述】:
我目前有一个带有两个选择下拉菜单的网页。 The top one is populated with countries, and when one is selected, the second select is then populated with major cities for that country.
目前 MySQL 用于从国家/地区表中获取所有记录以填充第一个选择,在选择一个后,使用 ajax 调用从 MySQL 对城市表的查询中获取结果,使用 where 子句仅返回所选国家/地区的城市。
如果每次更改国家/地区都不需要 ajax 调用,我该如何处理?并且还不必为每个国家/地区运行查询?
【问题讨论】: