搜索提示jQuery插件:Autocomplete.js
Autocomplete.js是jQuery插件,改善与提示搜索。 Autocomplete.js也有一些选项来定制。
1. 填写提示和调用插件在选择的HTML元素上。
var words = ['boat', 'bear', 'dog', 'drink', 'elephant', 'fruit']; $(document).ready(function(){ $('#yourElement').autocomplete( hints: words ); });
Options
- hints: words array for displaying hints
- placeholder: search input placeholder (default: 'Search')
- width: input text width
- height: input text height
- showButton: display search button (default: true)
- buttonText: button text (default: 'Search')
- onSubmit: function handler called on input submit
- onBlur: function handler called on input losing focus
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!