我在这里成功使用了选择下拉代码
我还想根据那里的 ID 搜索下拉列表中的文本。
像下面的例子
<select chosen data-placeholder="Select Country" class="chosen-select" id="txtcontry"
ng-options="country.Id as country.Name for countryName in CountryNames" ng-model="country.Id">
<option value="Select Country"></option>
</select>
现在每个country Name
都有一个Id
与之相关的。所以我想search
和也name
一样Id
。
例如,如果国家名称是,United States
那么
如果我输入,那么它应该将我显示为输出。Id
100
100
United States