在多选列表中加载JSON

时间:2011-02-15 13:07:08

标签: json jquery-ui jquery-plugins

我正在尝试通过ajax在mcDropdown jQuery插件中加载一些json对象,这里是示例http://khine.3b1.org/countries.htm

我要加载的数据是从以下查询中返回的:

/;国家iana_root_zone = FR

这将返回所有区域。

  [{"name": "fr#alsace", "value": "Alsace"}, {"name": "fr#aquitaine", "value": "Aquitaine"}, {"name": "fr#auvergne", "value": "Auvergne"}, {"name": "fr#basse-normandie", "value": "Basse-Normandie"}, {"name": "fr#bourgogne", "value": "Bourgogne"}, {"name": "fr#bretagne", "value": "Bretagne"}, {"name": "fr#centre", "value": "Centre"}, {"name": "fr#champagne-ardenne", "value": "Champagne-Ardenne"}, {"name": "fr#corse", "value": "Corse"}, {"name": "fr#franche-comte", "value": "Franche-Comté"}, {"name": "fr#haute-normandie", "value": "Haute-Normandie"}, {"name": "fr#ile-de-france", "value": "Île-de-France"}, {"name": "fr#languedoc-roussillon", "value": "Languedoc-Roussillon"}, {"name": "fr#limousin", "value": "Limousin"}, {"name": "fr#lorraine", "value": "Lorraine"}, {"name": "fr#midi-pyrenees", "value": "Midi-Pyrénées"}, {"name": "fr#nord-pas-de-calais", "value": "Nord-Pas-de-Calais"}, {"name": "fr#pays-de-la-loire", "value": "Pays de la Loire"}, {"name": "fr#picardie", "value": "Picardie"}, {"name": "fr#poitou-charentes", "value": "Poitou-Charentes"}, {"name": "fr#provence-alpes-cote-d-azur", "value": "Provence-Alpes-Côte-d'Azur"}, {"name": "fr#rhone-alpes", "value": "Rhône-Alpes"}]

/;国家iana_root_zone = FR&安培;区域=阿尔萨斯

此返回返回region = alsace和iana_root_zone = fr的所有县:

  [{"name": "fr#alsace#bas-rhin", "value": "Bas-Rhin"}, {"name": "fr#alsace#haut-rhin", "value": "Haut-Rhin"}]

如何更改http://khine.3b1.org/countries.htm处的示例,以便加载正在返回的JSON。

非常感谢任何建议

0 个答案:

没有答案