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下载地址
查看全文
相关阅读:
原来真的不会用指针[*p++]
关于arm-linux-gcc的安装与配置
Linux串口编程のtermios 结构
alarm函数可以定时
FFMPEG视音频解码【一】
随机数组的生成方法
.net 容器类
(转)Kinect背景移除支持多人
(转)MFC美化
(转)美化Button必备
原文地址:https://www.cnblogs.com/skyblue/p/1523354.html
最新文章
weex 开发踩坑日记--环境配置、安卓运行、adb、开发
vue js 在组件中对数组使用splice() 遇到的坑。。。
vue element-ui upload 实现带token上传
毕业设计心得与整理-APP-主题切换
毕业设计第四次任务书
毕业设计需求分析1--模块
个人附加作业
个人作业3--个人总结
结对编程2——单元测试
个人作业2 — 英语学习APP的案例分析
热门文章
直观的数学:度量张量简介
VS20xx下项目开发目录管理方法
关于自然常数e的理解
如何用chrome修改js代码,跳过网站等待时间
仿射空间与仿射变换
世界,你好!
以项目为钥匙开启Go的世界
Docker从零构建php-nginx-alpine镜像
libxml两种换行方法
Windows下使用ODBC API访问数据库之关键
Copyright © 2011-2022 走看看