Yet Another Autocomplete

程序名称:Yet Another Autocomplete

授权协议: 未知

操作系统: 跨平台

开发语言: JavaScript

Yet Another Autocomplete 介绍

I created this plugin because I was not happy with any of the other ones. This
plugin will give you simple, clean autocomplete functionality on the selected
text box.

Here’s the code:

HTML File:

<form id="myform"> <input type="text" name="my_textbox" id="my_textbox" /> </form> <script type="text/javascript"> <!-- $(function() { var data = { fn : 'lookup' }; var options = { min_length : 3, error_responses : [ "No results.", "Too many results." ] }; $("#suggest").suggest("search.php", data, options); }); --> </script>

Example server-side PHP script, search.php:

`<?php
// Prevent caching
header(“Cache-Control: no-cache, must-revalidate”); // HTTP/1.1
header(“Expires: Jan 1, 2000”); // Date in the past
$fn = $_GET[‘fn’];
$allowed_fns = array(‘lookup’);
if (!in_array($fn, $allowed_fns)) { exit; }
print call_user_func($fn);

function lookup() {
$q = valueIfSet($_GET[‘q’]);
$attrs = array(“uid”, “givenname”, “sn”);
$filter = “level03=95C”;
try {
$results = your_ldap_lookup_function($q, $attrs, $filter, true, , 1);
} catch (Exception $e) {
return “Too many results.”;
}
if (count($results) === ) {
return “No results.”;
}
$list = array();
foreach ($results as $result) {
$sn = $result[‘sn’];
$gn = $result[‘givenname’];
$uid = $result[‘uid’];
$name = “$sn, $gn ($uid)”;
array_push($list, $name);
}
return implode(“\n”, $list);
}
?>`

Yet Another Autocomplete 官网

http://plugins.jquery.com/project/YA_AutoComplete

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


多功能下拉选择插件 SelectPage 简洁而强大的下拉分页选择器;支持远程数据(AJAX)、
AutoComplete 是一个 jQuery Mobile 的插件,用于实现在 jQuery Mobile 中的搜索框中提供自动完成的功能。
Combogrid 是一个jQuery插件用于为输入框添加高级自完成功能(auto- complete)。当用户输入的时候,会在输入框的下方面动态显示一个拥有分页功能的表格(Grid)控件。
Autobox2这个jQuery插件,可以用于创建类似于Facebook风格的AutoComplete控件。
Link Scraper TextBox 是一个文本框的扩展插件,当你输入一个 URL 时,就会在输入框下方显示该 URL 地址对应的网页标题。
Awesomplete 超小超好用的超漂亮的 autocomplete 框架并且对其它框架零依赖 gzip 压缩后只有2kb
jQuery.autocomplete 是另外一款在文本框中实现自动完成的jQuery插件。 在线演示:http://mabp.kiev.ua/content/source/autocomplete/autocomplete.html
简洁、易用、多样的菜单解决方案 状态 入门指南、DEMO、文档 插件官方首页(入门指南、DEMO、文档):
Ajax Autocomplete for jQuery jQuery 的自动补全组件,支持 Ajax 获取远程数据,支持数据分组显示。
这是一个用来在文本输入框中实现自动完成的jQuery插件。 主要的功能有: 使用和配置简单;
Easily build your own simple or complex autocomplete systems, or use standalone.
TextExt 是一个 jQuery 插件,提供对文本输入框的功能扩展,可实现自动完成、标签输入、ajax和过滤功能。
这款jQuery插件来自于Twitter的一个新的项目,支持远程和本地的数据集。比较有特色的地方在于你可以将数据集使用本地存储(local
At.js 是一个Twitter / Weibo样式的@自动完成插件。Demo演示 功能特性: 可以监听任何字符,不仅仅只是’@‘,可以设置监听不同的字符和使用不同的数据。
马可波罗(Marco Polo),一个为独具慧眼的开发人员准备的jQuery自动补齐插件。
看看上面的截图,你能明白该插件的用途了吗?当你在编辑框中输入 @xxx 的时候就会触发 Ajax
这是一个在文本输入框中实现自动完成的jQuery插件。 本站采用了该插件。 使用代码示例:
A full featured autocompleter that’s easy to use. It uses caching to produce lightning speeds and to limit server requests.
DevBridge Ajax Autocomplete 是一个实现了文本输入框的自动完成输入的插件。支持大多数浏览器,要求至少 IE 7+
jqac (jQuery Auto Complete) 是一个实现了编辑框输入自动完成的jQuery插件。 在线演示