【发布时间】:2013-07-20 09:43:45
【问题描述】:
我正在尝试使用来自外部 JSON 文件的数据填充 HTML 下拉菜单,该文件包含以下内容
{
"Destinations": [
{
"destinationName": "London",
"destinationID": "lon"
},
{
"destinationName": "New York",
"destinationID": "nyc"
},
{
"destinationName": "Paris",
"destinationID": "par"
},
{
"destinationName": "Rome",
"destinationID": "rom"
}
]
}
我想要的是显示目的地名称的下拉菜单,例如伦敦、纽约等,但我不知道如何处理。
感谢任何帮助。
【问题讨论】:
标签: jquery html json html-select