jQuery UI自动完成匹配 [英] jquery ui autocomplete match

查看:90
本文介绍了jQuery UI自动完成匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面上实现了jQuery自动完成用户界面. 但是当我搜索"am"时,包含"am"的每个单词都会在下拉列表中列出.

I implemented jquery autocomplete ui on my page.. But when i search for example "am" every word which CONTAINS "am" is going to be listed in the drop down.

但是我只想列出以"am"开头的单词.

But i want just the words which BEGIN with "am" should be listed.

我不知道该怎么办..你能帮我吗?

I dont know how to do that.. can you help me plz?

推荐答案

由于要从服务器端数据源获取数据,因此应过滤返回给自动完成控件的数据.该控件将仅显示返回给它的任何数据.

Since you're getting the data from a serverside datasource, you should filter the data that is being returned to the autcomple control. The control will just show whatever data that is returned to it.

这篇关于jQuery UI自动完成匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆