本文介绍了国家下拉菜单会自动改变区域选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要使用一些JavaScript(jQuery的最好),以显示一个国家下拉菜单,选择一次,这将来自该国的显示与地区其他下拉选择。
I need to use some javascript (ideally jQuery) to display a dropdown menu of countries and once selected this will display another dropdown with regions from that country selected.
我猜我需要一些API作为他们的将可能是选择负载。
I'm guessing i'd need some API as their would potentially be loads of options.
例如
用户选择美国
车展与美国各州新的下拉菜单'阿拉巴马州等......
e.gUser selects 'United States'Auto show new dropdown with US states 'Alabama etc...'
推荐答案
下面是一个
Here is a jQuery plug-in which allows you to easily make cascading drop down. I am not sure what service you will use to get names of all countries, but you can take a look at geonames.
编辑:
检查看起来不错。
这篇关于国家下拉菜单会自动改变区域选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!