下拉提示(GoogleSuggest)

样式:  


JS:(Jquery)


AjAx:

public void ProcessRequest (HttpContext context) {
        BLL.Hotel bHotel = new BLL.Hotel();
        context.Response.ContentType = "text/plain";
        string teststr = context.Request.Form["searchText"];
        DataTable dt = bHotel.GetHotelName(teststr).Tables[0];
        string str = null;
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            str += dt.Rows[i]["HotelName"]+",";
        }
        context.Response.Write(str);
    }


你可能感兴趣的:(技术,autocomplete,function,javascript,string,jquery,class)