Alibabacloud.com offers a wide variety of articles about jquery autocomplete function, easily find your jquery autocomplete function information here online.
In addition, the implementation principle of AutoComplete auto-completion is mainly implemented in the asp.net background. Considering the performance, it is best to generate xml and merge it into the cache. I. Brief Introduction
Yesterday, a support Colleague helped her customer achieve the following results (automatically completed ):
I used to call the real estate dictionary when I searched for the house:
This is a small feature and a large feat
In addition, the implementation principle of AutoComplete auto-completion is mainly implemented in the asp.net background. Considering the performance, it is best to generate xml and merge it into the cache. I. Brief Introduction
Yesterday, a support Colleague helped her customer achieve the following results (automatically completed ):
I used to call the real estate dictionary when I searched for the house:
This is a small feature and a large feat
The text box automatically matches the phone number and name, and the data is the JSON data that is found, which encapsulates all objects (telephone, cellphone, name). Select a phone number,
The code for automatically filling a name is as follows:
$. Ajax ({
URL: '/account/ajaxfinduserphonelist ',
Type: 'Post ',
Cache: false,
Contenttype: "application/JSON ",
Datatype: "JSON ",
Success: function (data ){
$ ("# Input_pair_phone").
{
Rebox.html (Result), show ();
}
Rebox.find (' Li '). bind (' MouseOver ', function () {
Lock the hint layer to ensure that the hint layer is not closed by bubbling
Locksuggest = true;
Index = $ (this). index ();
Changeselect (Index,false);
})
. bind (' click ', function () {
Changeselect (index);
Searchsubmit ();
});
Rebox.bind (' Mouseout ', function
Compared with similar plug-ins, it features three features.
1. cache query results (fast secondary query)
2. Non-keyup listening (solving the problem that keyxxx events cannot be triggered in some systems/situations)
3. Simple parameters (nice looking ?)
The plug-in performance is still good. My E6500, 2 GB memory, a total of 4469 calls occurred in 30 seconds, taking 94.65 milliseconds; Baidu's is 2432 calls, 80.24 milliseconds.
Calling nearly doubled is a problem in
Parameter url:baseurl, such as the PHP tutorial ">http://www.111cn.net/search.phpThe list of suffixes for the parameter params:url, and the URL that is flattened in the example is: http://www.111cn.net/search.php?kw=xxxn=10callback=? (default join Callback)Parameter delay: input interval time, mainly in order to reduce load, the larger the number, the lower the load, the slower the query speed.Parameter cache: Is the utility cache, default is true, for example, when searching for "test", the pro
Three JavaScript codes are introduced on the page:
Introduce the CSS file of jquery UI
$ (Function () {function log (Message) {$ ("
HTML code:
Configure the spelling check and auto-completion components in solrconfig. xml:
When so is input, for example:
When SOLR is selected, for example:
, which has two parameters (event, ui ). Ui parameters in this event Is empty.
Search
After the auto-completion search is complete, the search method is called. Two parameters (event, ui ). The ui parameter in this event is null.
Response
After the auto-completion search is completed Response method, which has two parameters (event, ui ). In this event The ui parameter of has a child object content, which returns the label and value Value, which can be learn
AutoComplete (' option ', Param,value)
JQuery objects
Set the value of the Options property
$ (' #reg '). On (' Autocompleteopen ', function () {alert (' triggered when open!
'); });
e-Mail Automatic completiondynamically set the data source by automatically supplementing the fu
JQuery plug-in development and jQuery. extend function details are different from jQuery. fn and jQuery. prototype. jquery. fn. extendI. jQuery plug-in development is divided into two t
Jquery plug-in is similar to the baidu search keyword auto-match function, and jquery Baidu search
Examples of this article are as follows:Jquery search keyword auto-match FunctionFor your reference, the specific content is as follows:JQuery AutoCompleteIs a jQuery-based plug-in that automatically matches search keywor
jquery is an excellent javascrīpt framework. Let's now discuss the functions that are executed after two pages are loaded in Jquery.$(document).ready(function(){ // 在这里写你的代码...});Code to run when the DOM load is completecan be simply writtenJQuery (function () {});What does (funct
In jQuery, the difference between jQuery (function () {}) and (function () {}) (jQuery) Is that jqueryfunction
Jquery is an excellent Javascr into pt framework. Now we will discuss the functions executed after loading two pages in
This article briefly introduces the differences between jQuery (function () {}) and (function () {}) (jQuery, for more information about how to develop jQuery plug-ins, see.
I. First readJQuery (function (){});Write AllJQuery (d
Transfer from http://www.cr173.com/html/17629_1.htmljquery is an excellent javascrīpt framework. Let's now discuss the functions that are executed after two pages are loaded in Jquery.1 $(document).ready(function(){ // 在这里写你的代码... });code that runs at the completion of the DOM loading can be abbreviated asJQuery (function() {});(
This article mainly introduces the differences between jQuery (function () {}) and (function () {}) (jQuery). For more information, see, I hope to help you. Jquery is an excellent Javascr into pt framework. Now we will discuss the functions executed after loading two pages i
JS entry function and JQuery entry function. js entry function jquery
First, let's talk about their differences:
(1) The JS window. onload event must be executed after all the content and files such as external images are loaded.
(2) The
1, (function ($) {...}) (JQuery);1), principle:This is actually an anonymous function, as follows:Function (ARG) {...}This defines an anonymous function with a parameter of ARGWhen calling a function, the parentheses and arguments are written after the
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.