zoukankan
html css js c++ java
AutoCompleteJQuery 应用
AutoComplete-JQuery 应用
今天试了一下效果,有点像Google下拉查询功能非常 棒
index.htm
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html
xmlns
="http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
>
无标题页
</
title
>
<
script
src
="thickbox/jquery-latest.js"
></
script
>
<
link
rel
="stylesheet"
href
="thickbox/main.css"
type
="text/css"
/>
<
link
rel
="stylesheet"
href
="thickbox/jquery.autocomplete.css"
type
="text/css"
/>
<
script
type
="text/javascript"
src
="thickbox/jquery.bgiframe.min.js"
></
script
>
<
script
type
="text/javascript"
src
="thickbox/jquery.autocomplete.js"
></
script
>
<
script
>
$(document).ready(
function
()
{
var
data
=
"
Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities
"
.split(
"
"
);
//
$("#example").autocomplete(data);
$(
"
#example
"
).autocomplete(
"
m.aspx
"
,
{autoFill:
true
}
);
}
);
</
script
>
</
head
>
<
body
>
<
input
type
="text"
id
="example"
/>
</
body
>
</
html
>
m.aspx
<%
@ Page Language
=
"
C#
"
AutoEventWireup
=
"
true
"
CodeFile
=
"
M.aspx.cs
"
Inherits
=
"
M
"
%>
m.aspx.cs
using
System;
using
System.Data;
using
System.Configuration;
using
System.Collections;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Web.UI.HtmlControls;
public
partial
class
M : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
Response.Write(GetValues());
}
protected
string
GetValues()
{
string
tmpstr
=
string
.Empty;
string
str
=
Request.QueryString[
"
q
"
];
if
(str
!=
null
)
{
if
(str.Length
>
0
)
{
string
[] ary
=
db.GetData(str);
//
取数据
if
(ary
!=
null
)
{
foreach
(
string
tmp
in
ary)
{
tmpstr
+=
tmp
+
"
\n
"
;
}
}
}
}
return
tmpstr;
}
}
Js下载地址
查看全文
相关阅读:
LINUX学习-Mysql集群-一主多从
LINUX学习-Mysql集群-主主备份
LINUX学习-Mysql集群-主从服务器备份
LINUX学习-Nginx+JDK+Tomcat+Mysql搭建JAVA WEB
LINUX学习-Nginx实现https
LINUX学习-Nginx服务器的反向代理和负载均衡
LINUX学习-PHP安装
LINUX学习-Mysql安装
Lens in Scala
scala中的 Type Lambda
原文地址:https://www.cnblogs.com/skyblue/p/1523354.html
最新文章
a标签,伪类选择器link不生效问题
测试面试题总结-第一章
Markdown 常用写法
jmeter连接数据库
jenkins定时执行脚本,自动发送邮件到邮箱
APP自动化测试内嵌H5三种处理方式(基于python)
接口自动化测试(该文章属于各方面整理所得,非原创)
APP自动化常用adb命令
Mac iTerm2 配置lrzsz
Linux基础命令
热门文章
Mac上安装MySQL-python遇到的问题和解决方法
使用AWS全球加速后由于服务器ttl值太小导致的客户端无法连接服务器排查
Mac下好用的软件
Golang连接redis时遇到的坑
用PHP自带的webserver调试程序
kubernetes技能图谱
Python知识图谱
多个Python版本的管理
SpringBoot--热部署
LINUX学习-Mysql集群-多主一从备份
Copyright © 2011-2022 走看看