ajax in action 输入前提示 type-ahead suggest
2010-11-29 10:59
405 查看
ajax in action 输入前提示 type-ahead suggest
ajax的输入前提示,本例基本实现了仿Google的输入前提示type-ahead suggest,也可称为自动完成功能autocomplete。它的特点是:
1,可重用,对于页面代码改动少。
2,使用了Prototype和Rico。
3,IE,火狐Firefox都可用
4,对于服务器端依赖性小,只要返回格式固定的数据,无论是asp,jsp,java的servlet都可以灵活应用。
5,使用Ajax in Action的net.js。
![](http://www.trucy.org/blog/pinkfloyd/mqney.com.201011280001.jpg)
有两点小缺憾:
1,服务器返回数据,使用js的eval()方法执行,eval方法按照JavaScript语法来执行包含在括号内的字符串。它的缺点是速度慢。本例中返回数据是国家序列,基本固定,数据量不大,所以影响不大。
2,出现提示框口以后,必须点中其中一个值它才消失,点击空白处不消失。
正文源码:
1,ajaxtest.typeaheadsuggest
2,net.js
3,AjaxTesttypeaheadSuggestCopyOfServlet
4,dll.sql
5,web.xml
按此阅读全文 "ajax in action 输入前提示 type-ahead suggest" »
相关文章推荐
- 补充输入前提示 type-ahead suggest
- Struts2 使用ajax访问action,返回json格式数据,提示error:There is no result type defined for type 'json'
- input框输入提示(通过ajax实时提示补全)
- The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace
- 在浏览器中输入URL之后会发生什么(what happens when you type in a URL in browser)
- <input type="text" value="">实现输入提示
- Ajax in action (英文版)
- linux服务器启动系统提示welcome to emergency mode! after logging in type...
- 试译《Ajax in Action》第四部分(三)
- Eclipse中使用printf报错 提示参数类型不对 已解决The method printf(String, Object[]) in the type PrintStream is not ap
- ajax实现输入时的自动提示
- 仿Google下拉框输入数据下拉提示数量- AJAX+PHP+MYSQL
- 在ASP.NET MVC中使用typeahead.js支持预先输入,即智能提示
- Allow Only Ajax Requests For An Action In ASP.NET Core
- Ajax In Action 附录 B 3.4
- ASP.NET AJAX in action第一天(ajax的基本使用步骤)
- Ajax In Action 书籍下载
- Ajax in action书评(1)
- The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace
- AJAX in Action