attribute that is used to associate a specific AutoComplete class. When AutoComplete is enabled, you do not need to repeat common information in the self-love form. If the browser AutoComplete is not disabled, the browser prompts the user to enter the same value as the previous one. (Even if you enter form fields in different websites) The Code is as follows:
Because the project needs to use an auto-completion function, function Description:Requirement one: When adding a recipient, the automatic drop-down displays all the recipient information in the database (the displayed information includes: name-to-receive address-contact info)Demand two: Select a worthy time, assign value to the corresponding text box (the recipient input box in the assigned name, the contact input box to assign the value of the phone number, the address in the input box assign
Usually with Baidu, Google search when there will be a drop-down list to prompt this is a very good feature this article is to introduce the jquery plugin called Ajax Autocomplete as the name implies that Ajax is the Ajax way to get the search hint information and then return to the renderedGossip doesn't say much directly on the codeThe files used in this article are:1, click Ajax Autocomplete for JQuery,
Auto-associative full effect based on jquery text box. This is a simple to use jquery AutoComplete plug-in, you can define index keywords, you can set the width of the input box, support search callback function. As follows:Online preview Source DownloadThe implemented code.HTML code:DivID= "Demo"> Divclass= "wrapper"> H3>Try typing "love programming."H3> DivID= "Search-form">Div> DivID= "message">Div> Div>
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
In previous projects, if there is too much data in the drop-down list, we will make the drop-down list multipage, or change it to autocomplete. Today, let's look at how to implement it.
First, let's look at webforms. We use the AjaxControltoolkit control, and we add an AJAX extension to the text box. 650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/1J4215F3-0.png "/>
650) this. width = 650; "border =" 0 "
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
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
AutoComplete can save time by displaying previous matching entries as we enter them. For example, we enter "hongen.com" in the address bar, do not lose the entire "http://www.hongen.com", you can open the Horn online home.
To achieve this function is very simple, just change a few small settings on it.
Start IE5 First, click on the "Tools" menu, click "Internet Options", and select the "Content" tab in the Pop-up Internet Options dialog box and clic
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
In web front-end development, when it comes to selection, AutoComplete is a fairly common plugin, but there are some bugs when it comes to Chinese.When you enter a Chinese text each time, the plug-in works very well, when the input of multiple Chinese characters at a time, it can not produce filtering.This problem is particularly noticeable on mobile phones. This problem exists even with the mobile version of Autocomplete.Look at the source code, 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.