日期:2014-05-17  浏览次数:20661 次

搜索引擎如何实现自动搜索


如何实现这功能,求指导
搜索引擎 搜索

------解决方案--------------------
google autocomplete ajax asp.net
------解决方案--------------------
Refer:


http://www.cnblogs.com/insus/archive/2011/07/16/2108172.html
http://www.cnblogs.com/insus/archive/2013/03/28/2986217.html
http://www.cnblogs.com/insus/archive/2013/04/05/2986989.html
------解决方案--------------------
use jquery autocomplete:
 $(function(){
            $("#<%=txtSfzh.ClientID %>").autocomplete("../services/SearchSyryInfoService.ashx",{
                width: 500,
                max: 20,
                delay: 20,
                cacheLength: 1,
                formatItem: function(data, i, max) {
                    return data.toString();
                },
                formatResult: function(data) {
                    return data.toString().split(",")[1];
                }
            }).result(function(event, data, formatted) {
                var array = data.toString().split(",");
                $("#<%=txtXm.ClientID %>").val(array[0]);//姓名