var dropdownData = [
{City: "New York City", State:"New York" },
{City: "Albany", State:"New York" },
{City: "Bufflo", State:"New York" },
{City: "Rochester", State:"New York" },
{City: "San Francisco", State:"California" },
{City: "Los Angeles", State:"California" },
{City: "San Diego", State:"California" }
];
我想显示两个下拉列表,其中第一个下拉列表显示所有纽约城市,第二个下拉列表显示加利福尼亚城市列表。有人可以阐明如何在knockoutjs中完成它吗?“dropdownData”列表是动态的,因此如果将其他状态添加到列表中,则应动态生成下拉列表。
任何帮助是极大的赞赏!
谢谢!