Copy Code code as follows:
autocomplete Textbox example
type in a-color in lowercase: Enter a color that starts with a lowercase letter (English words, such as: R, B, etc.)
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=xxx&n=10&callback=? (default join
Two places were mainly modified:
One, up and down selection and input value synchronization problem.
After entering the keyword, when the Drop-down option appears, the key word input box value is not synchronized with the value of your choice when
This article is invalid. Use jquery easy-UI to make it more convenient (add later)
After a long time, the system failed to enable automatic prompts. Today, it's hard to find it online and record it.
imitating IE's automatic function, read
To improve efficiency and reduce redundant operation procedures, the first method is to provide a simple input box and then use fuzzy query to retrieve all the content of the relevant keywords, you can also query the results twice. Method 2:
// Jquery class library
// Css Style
// A text box is required for the pageSearch:
// JS script
// Search. ashxString STR = context. request ["Q"]; // receives the Q parameter, which automatically returns the value of the search box.
/******
There are many common examples. This article is just my work record.
Front-end page:
@{Viewbag. Title = "Homepage ";}@ Section header{}Keywords:@ Html. Textbox ("keyword ","")
@ Html. Hidden ("txtselectvalue ")// Intelligently query the
The front-end code is as follows:
Copy codeThe Code is as follows:
Automatic completion of JQuery
Then there is the background code. Of course, here we just simulate the data:Copy codeThe Code is as follows: using System;Using
You can use the keyboard to move up or down to obtain values in the Lenovo menu as needed, just like google baidu's query function.I have not found any plug-ins that can implement this function for a long time on the Internet. Instead, I can only
At present, it has not implemented interaction with the database, and the data is written to death. Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
API Reference: (try "C" or "E ")
Nonsense not much said, intuitive look at:
Implementing this feature requires service-side coordination. The client uses a script to show the data obtained from the server.
Look at the client's HTML first:
Copy Code code as follows:
The foreground code is as follows:
Copy Code code as follows:
jquery Auto-completion function
And then there's the background code, and of course, here's just the analog data:
Copy Code code
Recently in a project, the need to fill in the administrative divisions, in order to prevent users to fill out errors, should use a drop-down selection to replace the text input, but the National administrative division has more than 3,000, with the
Share an automatically completed 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.
Copy
Copy codeThe Code is as follows: Autocomplete Textbox Example Type in a color in lowercase: enter a color that begins with a lowercase letter (for example, r or B)
There are many common examples. This article is just my work record.
Front-end page:
@{ViewBag. Title = "Homepage ";}@ Section Header{}Keywords:@ Html. TextBox ("keyword ","")
@ Html. Hidden ("txtSelectValue") // intelligently queries the selected
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.