我在手机的标签/值列表上使用jquery自动完成:
[ { label: "Samsung Galaxy S7", value: "Samsung Galaxy S7"},
{ label: "Samsung Galaxy S6", value: "Samsung Galaxy S6"},
.....
]我想在不指定系列名称的情况下执行一项研究,例如,如果用户键入"Samsung S7“自动完成提示"Samsung Galaxy S7”
我试着修改源代码如下:
[ { label: "Samsung Galaxy S7 Samsung S7", value: "Samsung Galaxy S7"},
{ label: "Samsung Galaxy S6 Samsung S6", value: "Samsung Galaxy S6"},
.....
]这段代码可以工作,但它很难看,因为自动完成菜单显示"Samsung Galaxy S6 Samsung S6“而不是简单的"Samsung Galaxy S6”
有没有一种方法可以在菜单中显示不同的属性的同时对属性进行研究?
https://stackoverflow.com/questions/38200949
复制相似问题