在javascript中自动搜索 [英] AutoSearch in javascript

查看:82
本文介绍了在javascript中自动搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在javascript中进行文本框自动搜索
当用户在文本框中输入一些值时,它必须使用javascript显示特定相关用户名的列表..

例如,在文本框中输入值a,则它必须显示以用户名开头的所有名称...

How can we do textbox autosearch in javascript
when user enters some value in textbox it has to show the list of particular related username by using javascript..

Eg..in textbox am entering value a then it has to show all names starting with a from username...

推荐答案

您正在谈论 AutoComplete文本框.

此处: http://simonwillison.net/code/js/autocomplete/ [
You are talking of AutoComplete textbox.

Here: Google search result[^]

An example: http://simonwillison.net/code/js/autocomplete/[^]


Basic logic behind it is using XMLHttpRequest in order to fetch data related to typed in text.

Try!


这篇关于在javascript中自动搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆