原文地址:http://docs.jquery.com/Plugins/Autocomplete/autocomplete
autocomplete
( url or data, [
options]
)
Options:
autoFill
Boolean
|
Default:
false
|
Fill the textinput while still selecting a value, replacing the value if more is typed or something else is selected. |
cacheLength
Number
|
Default:
10
|
The
number of backend query results to store in cache. If set to 1 (the
current result), no caching will happen. Must be >= 1. |
delay
Number
|
Default:
400 for remote, 10 for local
|
The delay in milliseconds the autocompleter waits after a keystroke to activate itself. |
extraParams
Object
|
|
Extra
parameters for the backend. If you were to specify { bar:4 }, the
autocompleter would call my_autocomplete_backend.php?q=foo&bar=4
(assuming the input box contains "foo"). The param can be a function
that is called to calculate the param before each request. |
formatItem
Function
|
Default:
Assumes that a single row contains a single value.
|
Provides
advanced markup for an item. For each row of results, this function
will be called. The returned value will be displayed inside an LI
element in the results list. Autocompleter will provide 4 parameters:
the results row, the position of the row in the list of results
(starting at 1), the number of items in the list of results and the
search term. |
formatMatch
Function
|
Default:
formatItem is used
|
Use
this option if you want to limit the data that autocomplete searches
for matches. For example, there may be items you want displayed to the
user, but don't want included in the data that's searched. Gets called
with the same arguments as formatItem. |
formatResult
Function
|
Default:
Assumes either plain data to use as result or uses the same value as provided by formatItem.
|
Similar
to formatItem, but provides the formatting for the value to be put into
the input field. Again three arguments: Data, position (starting with
one) and total number of data. |
highlight
Boolean
, Function
|
Default:
Wraps the search term in a <strong> Element
|
Whether
and how to highlight matches in the select box. Set to false to
disable. Set to a function to customize. The function gets the value as
the first argument and the search term as the second and must return the
formatted value. |
matchCase
Boolean
|
Default:
false
|
Whether or not the comparison is case sensitive. Important only if you use caching. |
matchContains
Boolean
|
Default:
false
|
Whether
or not the comparison looks inside (i.e. does "ba" match "foo bar") the
search results. Important only if you use caching. Don't mix with
autofill. |
matchSubset
Boolean
|
Default:
true
|
Whether
or not the autocompleter can use a cache for more specific queries.
This means that all matches of "foot" are a subset of all matches for
"foo". Usually this is true, and using this options decreases server
load and increases performance. Only useful with cacheLength settings
bigger than one, like 10. |
max
Number
|
Default:
10
|
Limit the number of items in the select box. Is also sent as a "limit" parameter with a remote request. |
minChars
Number
|
Default:
1
|
The minimum number of characters a user has to type before the autocompleter activates. |
multiple
Boolean
|
Default:
false
|
Whether to allow more than one autocompleted-value to enter. |
multipleSeparator
String
|
Default:
", "
|
Seperator to put between values when using multiple option. |
mustMatch
Boolean
|
Default:
false
|
If
set to true, the autocompleter will only allow results that are
presented by the backend. Note that illegal values result in an empty
input box. |
scroll
Boolean
|
Default:
true
|
Whether to scroll when more results than configured via scrollHeight are available. |
scrollHeight
Number
|
Default:
180
|
height of scrolled autocomplete control in pixels |
selectFirst
Boolean
|
Default:
true
|
If
this is set to true, the first autocomplete value will be automatically
selected on tab/return, even if it has not been handpicked by keyboard
or mouse action. If there is a handpicked (highlighted) result, that
result will take precedence. |
width
Number
|
Default:
width of the input Element
|
Specify a custom width for the select box. |
分享到:
相关推荐
1.该js支持jquery的自动补全功能 2.因为jquery-ui是jquery的插件,所以部分版本jquery可能不支持该插件,建议换成内附的jquery.js 3.如有疑惑,请阅读内附的说明文档
jQuery自动完成插件autocomplete.zip
jquery搜索自动提示下拉框插件autocomplete
autocomplete——js,css文件+ 例子
jquery.autocomplete.js 、jquery.autocomplete.css
PHP结合jQuery.autocomplete插件实现输入自动完成提示的功能_.docx
Jquery autocomplete插件使用
jquery-autocomplete 自动完成插件
autocomplete, jQuery自动完成插件,如Google自动完成 电子邮件自动完成文档&演示插件jQuery自动完成插件如谷歌搜索 npm install jquery-autocomplete
jquery-autocomplete搜索框自动完成的中文文档,上手快,轻便,功能强大
jquery自动补全插件(jquery autocomplete) 内包含使用说明,前台+后台
jquery-autocomplete 智能提示jquery-autocomplete 智能提示jquery-autocomplete 智能提示jquery-autocomplete 智能提示
jQuery UI Autocomplete是jQuery UI的自动完成组件演示代码
jQuery plugin for autocomplete - jQuery自动完成插件
jquery-autocomplete 可用
NULL 博文链接:https://canrry.iteye.com/blog/750679
运用jquery.autocomplete.js 和jquery.autocomplete.css实现文本框自动补全,直接下载可以看到运行效果,带注释
jquery.autocomplete 自动提示
jQuery plugin: Autocomplete 参数及实例 官网:jQuery plugin: Autocomplete 此插件依赖于 jquery 1.2.6 --- jquery 1.8.3 转自:http://www.cnblogs.com/duanhuajian/p/3398904.html