Automatic completion, provided that the Jquery-ui CSS and JS must be introduced, otherwise it will not be completed automatically.html lang="en">head> meta charset="Utf-8"> title>JQuery UI Autocomplete-default functionalitytitle> link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/ Smoothness/jquery-ui.css "> script src="//code.jquery.com/jquery-1.10.2.js">script> script src="//code.jquery.com/ui/1.11.4/jquery-ui.js">script> link rel=
When you enter AutoComplete, you can give a prompt based on the user input. The data source can be local or remote. The DataSource of AutoComplete can use a Function. In this article, we use JSONP to query the Function.When the data source is Function, its Function is defined:Function (Object request, Function response (Object data ))Request is a request that contains a term attribute, Which is input by the
Find the following code:Copy codeThe Code is as follows:. Bind ("blur. autocomplete", function (event ){If (self. options. disabled ){Return;}
ClearTimeout (self. searching );// Clicks on the menu (or a button to trigger a search) will cause a blur eventSelf. closing = setTimeout (function (){Self. close (event );Self. _ change (event );},150 );});Replace:Copy codeThe Code is as follows:. Bind ("blur. autocomplete
Problem 1: When a json string is obtained from a webserver or a general application processing program (. ashx), it cannot be automatically identified and is interpreted as a string type. In fact, it is not very difficult to solve this problem. You only need to reload a method. Below we will post some code: Pay attention to the red part.Copy codeThe Code is as follows:$ ("# Txt"). autocomplete ("/Asmx/ExecutePlan. ashx ",{ExtraParams: {hosid: HosID, p
A drop-down list similar to Baidu or Google search is used to open Baidu and enter the search conditions. As soon as you enter the drop-down list, a drop-down list box is automatically displayed, showing all the search content.
I. JS part
The Code is as follows:
//************************************** ******************// Creation date:// OPERATOR: oloen// Content Description: Automatically complete the JS class// Usage:// Var auto = new autoComplete
This article will introduce you to the Yii-AutoComplete form auto-Prompt instance. For more information, see. This article will introduce you to the Yii-AutoComplete form auto-Prompt instance. For more information, see.
Script ec (2); script
CJuiAutoComplete can automatically prompt users to enter text based on the first few characters. It encapsulates the JUI autocom
A drop-down list similar to Baidu or Google search is used to open Baidu and enter the search conditions. As soon as you enter the drop-down list, a drop-down list box is automatically displayed, showing all the search content.
I. JS part
The Code is as follows:
//************************************** ******************// Creation date:// OPERATOR: oloen// Content Description: Automatically complete the JS class// Usage:// Var auto = new autoComplete
Since Crave State-of-the-art technology, you ' ve just purchased a phone with a great new feature:autocomplete! Your phone ' s version of AutoComplete has some pros and cons. On the one hand, it ' s very cautious. It is only autocompletes a word if it knows exactly what do you ' re trying to write. On the other hand, you have to teach it every word you want to use.You have N distinct words, you ' d like to send in a text message in order. Before sendi
Find the following code:
Copy codeThe Code is as follows:. bind ("blur. autocomplete", function (event ){
If (self. options. disabled ){
Return;
}
ClearTimeout (self. searching );// Clicks on the menu (or a button to trigger a search) will cause a blur eventSelf. closing = setTimeout (function (){Self. close (event );Self. _ change (event );},150 );});
Replace:Copy codeThe Code is as follows:. bind ("blur.
About the remote return of the JSON data display, the same code, if the local write JSON string data, plug-in display there is no problem, once replaced by ULR way to read the same data, plug-ins can not display the problem properly.The occasional search for information today to find a question on the CSDN, is the same problemHttp://topic.csdn.net/u/20090703/14/8d349262-8ca1-4bf5-998d-3a0712412149.htmlThere's an expert in the solution$ ("#autocomplete
One: JS part
Copy Code code as follows:
//********************************************************
Date Created: 2009-03-10
Author: Oloen
Content Description: Automatic completion of JS class
Usage:
var auto = new AutoComplete (client ID);
Auto. Init (document.all. Client ID);
Auto. Type = ' Psunit '//pssale
//********************************************************
Automatic completion
function
Areas of expertise in Node. js are:
Does not require many operations
High throughput requirements
Lightweight and fast incoming messages
Low outgoing message and fast request
The online examples are socket. io. I have been wondering where I can use it? Based on the advantages of node. js (fields of expertise), I came up with this application scenario:
In the autocomplete Application Scenario of jQuery UI, the required data is fragmented but larg
This article mainly introduces a simple example of Autocomplete Automatic completion implemented by JS. If you need it, you can refer to the following example to share the Autocomplete source code that was accidentally discovered. The array is used for testing. In actual use, we can use Ajax to obtain data from the server.
Tip: You can directly save it to an html file to view the effect.
The Code is as
AutoComplete-Automatic completion plug-in (2)
1) autosuggest You can change any regular text input box to a tag to automatically complete the input box. It dynamically creates all the HTML elements required by the function. With autosuggest, no additional HTML needs to be added
Code .
Home page: http://code.drewwilson.com/entry/autosuggest-jquery-pluginupdate Date: 2010-07-18
2) ajaxcombobox An advanced Ajax ComboBox control that provides
The auto-Prompt function is required in work. Haha, I am a JS dish, So Baidu finds a plug-in developed with jquery AND ITS autocomplete. net version of the Automatic completion function, so down to change to the PHP version, and added support for up/down select text and other features, put up to share, pure physical activity... :)
1. Download jquery library, URL: http://jquery.com /;
2. Download The jquery AutoCom
In the past, we developed ajax, which is used for custom development like google's Automatic completion function. Now jquery is much more convenient, and he provided us with jQuery Autocomplete Automatic completion plug-in code, let's take a look at the actual application of this Code.
In the past, we developed ajax, which is used for custom development like google's Automatic completion function. Now jquery is much more convenient, and he provided us
Today again use to jquery-ui.min.js in the AutoComplete this method, remember the first time in the internship is a year ago, now only remember a look, so went to find the original code, finishing half a day to straighten out, here to share:Big group number: 158138959Before is the data in the Web page request is ashx, now is MVC, at the beginning also want to use the previous method, feel lazy don't want to think on the copy, but still have to think A
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.