The AutoComplete control is already widely used on the Internet. It was used once in a project, but it is not well encapsulated. I recently learned how to develop a control. I feel that this control will be used in the future, so I tried to write one.
Although this control is available on the Internet at will, in order to integrate it into your own framework, it is also necessary to develop on your own, and the development process is also an opportuni
I recently started learning jquery and want to automatically display results similar to Google search. So I chose to use the jquery AutoComplete plug-in.
Download the required files, jquery.autocomplete.jsand jquery.autocomplete.css.
Since the data obtained by the control can be obtained through the array and URL methods, I wrote two simple examples to test it.
Front-endCodeAs follows:
Code
Code highlighting produced by Actipro CodeHigh
Preface
Recently, we have been developing Winform. There is a scenario for querying bus information. You can enter some site names in the Start station input box, and the system will automatically give him suggestions and prompts, similar to auto-completion and smart prompts in Google, in Winform or WebForm ,. net provides a good solution, and you can even directly use the AutoComplete control in Ajax.
However, the problem arises. This function has to
1, autocomplete get background dataFirst introduce the CSS and JS file, and the corresponding HTML code is as follows:Linkhref=".. /css/jquery-ui.css "rel= "stylesheet" />Scripttype= "Text/javascript"src=".. /js/jquery-1.9.1.min.js " >Script>Scripttype= "Text/javascript"src=".. /js/jquery-ui.js " >Script> label for= "Language">Search:lable>inputID= "Language"name= "Language"type= "text">The corresponding JS code is as follows:// directly request the
Jquery. AutoComplete. js Chinese version (firefox is supported). Note that it fixes some bugs in Chinese Input. You can test them if you need them.
The Code is as follows:
JQuery. autocomplete = function (input, options ){// Create a link to selfVar me = this;// Create jQuery object for input elementVar $ input = $ (input). attr ("autocomplete", "off ");// Appl
as follows:
Like new capxous. AutoComplete ("wiki", function () {
Return "autocomplete3.asp?typing=" + Escape (this.text.value);
});
Then in the ASP to accept the value
Typing =trim (request.querystring ("typing"))
and then query
Set rs=conn.execute ("Select Ygbh,dw,ygxm from Wuhen_t_yg WHERE ygxm like '%" typing "% ' ORDER by YGBH DESC")
The problem is this, the query in the Addres
JQuery AutoComplete auto-completion, jqueryautocomplete
JQuery. AutoComplete is a jQuery-based auto-completion plug-in. With jQuery's excellent cross-browser features, it can be compatible with Chrome, IE, Firefox, Opera, Safari, and other browsers.
Features:
You can set the width of the Completion list.
Supports setting the maximum height of the complete list.
Supports limit on the number of rows in th
Recently, in a project, you need to search data for a project selected by the user, but there are too many projects to select. If you bind the project to dropdownlist, it will be very slow, it is hard to find out if there are too many projects,
In this way, we can use the jquery plug-in autocomplete. However, the official example of such a plug-in is very simple, but it is not that easy to add your own needs.ArticleFinally, download the plug-in and
The jQuery plug-in Autocomplete does not support multiple Chinese characters. jqueryautocompleteIn front-end web development, when it comes to selection, Autocomplete is a very common plug-in, but this plug-in has some bugs when it comes to Chinese.This plug-in works well every time a text is entered. When multiple text is entered at a time, it cannot be used for filtering.This problem is particularly evide
However, the only pity is that when the Chinese Input Method is enabled, firefox3.0 automatically matches Chinese pinyin, And the entered Chinese cannot be triggered in time; in my IE6.0, there is no such problem.
Cause analysis:
The Autocomplete plug-in triggers automatic matching of user input characters through the "keydown" event (Analysis of jquery. autocomplete. js line 92nd). in IE6, when the input m
CJuiAutoComplete can automatically prompt users to enter text based on the first few characters. It encapsulates the JUIautocomplete plug-in. Basic usage: $ this- amp; gt; widget ( amp; #39; zii. widgets. jui. CJuiAutoComplete amp; #39;, amp; nbsp; array ( amp; #39; name amp; #39; amp; gt; amp; #39; city amp; #39;, amp; #39; sour... CJuiAutoComplete can automatically prompt users to enter text based on the first few characters. It encapsulates the JUI
First, introduce the file. In addition to the basic files of juqery and juqeryUI, you also need to introduce the following files1 2 3 4 5 The following is how to use the. js file:01 $ ("# tags"). autocomplete ({02 source: function (request, response ){03 $. ajax ({04 url: "SQL/sqlgetWebsqlDataBaseInforAjax ",05 dataType: "json ",06 data :{07 searchDbInforItem: request. term08 },09 success: function (data ){10 response ($. map (data, function (item ){1
This article mainly introduces information about autocomplete Automatic completion form based on the bootstrap plug-in. If you are interested, refer to the autocomplete Automatic completion form based on the bootstrap plug-in to provide script code and use cases, as well as the background server (php), the original text is not clear, I hope to help you.
First, you must load bootstrap jquery. It should be
However, the only pity is that when the Chinese Input Method is enabled, firefox3.0 automatically matches Chinese pinyin, And the entered Chinese cannot be triggered in time; in my IE6.0, there is no such problem.Cause analysis:The Autocomplete plug-in triggers automatic matching of user input characters through the "keydown" event (Analysis of jquery. autocomplete. js line 92nd). in IE6, when the input met
Http://stackoverflow.com/questions/13011127/how-to-remove-change-jquery-ui-autocomplete-helper-textHow to Remove/change JQuery UI Autocomplete Helper text?It seems that's a new feature in jquery UI 1.9.0, because I used jquery UI plenty of times before and this text neve R poped up.Couldn ' t find anything related on the API documentation.So using a basic AutoComplete
Files installed/required for introductionHere is my relative path, the reader to use their own corresponding correct path
elements that use plug-ins
OK, the following mainly from two aspects of the change plugin use: Local data, Ajax dynamic access to dataLocal datavar countries = [{value: ' American ', data: ' Us '},{value: ' Chinese ', Data: ' ZH-CN '},// ...{value: ' 中文版 ', data: ' En '}];$ (' #autocomplete ').
GitHubHTTPS://github.com/pixabay/jquery-autocomplete/blob/master/demo.htmlWebsite DemoHTTPS://goodies.pixabay.com/jquery/auto-complete/demo.htmlCdn:src= '//cdn.bootcss.com/jquery-autocomplete/1.0.7/jquery.auto-complete.min.js ' >script>hrefrel = ' stylesheet '>My Demo:Parameter 1: term input for text boxParameter 2:suggest is a core function that adds an array of strings to the
AutoComplete plug-in function is similar to Google Suggest function, can be in the user input query conditions, automatically prompt users a number of entries, convenient for users to quickly query. Below we describe how the next AutoComplete plugin is used under MVC.First, you need to download the AutoComplete plugin, which is: http://bassistance.de/jquery-plugi
JQuery AutoComplete auto-completion, jqueryautocomplete
JQuery. AutoComplete is a jQuery-based auto-completion plug-in. With jQuery's excellent cross-browser features, it can be compatible with Chrome, IE, Firefox, Opera, Safari, and other browsers.
Features:
You can set the width of the Completion list.
Supports setting the maximum height of the complete list.
Supports limit on the number of rows in th
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.