Home > Web Front-end > JS Tutorial > body text

Implement automatic prompts when entering text boxes (like Baidu and Google)_jquery

WBOY
Release: 2016-05-16 17:54:28
Original
1283 people have browsed it

As long as there are three files:
A js plug-in autocomplete.js and two autocomplete.css files, which are plug-ins provided by the jquery official website;
Their download address: http://jqueryui.com/ demos/autocomplete/

One is the general processing program;
The other is the apsx page, look at the code below;
Front desk:

Copy code The code is as follows:





Username: < ;/asp:TextBox>





The background is a general handler:
Copy code The code is as follows:

public class LoginTest : IHttpHandler
{
string str;
public void ProcessRequest(HttpContext context)
{
getUserName();
context. Response.Write(str);
}
public bool IsReusable
{
get
{
return false;
}
}
private void getUserName( )
{
DataSet ds = SqlHelper.BuildDataSet("select * from login", CommandType.Text);
str = ConvertJson.ToJson(ds);
}
}

Run result:

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template