推广 热搜:   中国  设备  参数  公司  未来  服务  行业  企业  教师 

html5里百度搜索框怎么做,基于jquery的仿百度搜索框效果代码

   日期:2024-11-19     作者:sic0574    caijiyuan   评论:0    移动:http://sicmodule.glev.cn/mobile/news/10127.html
核心提示:');}else {for (var i = 1; i = data.length; i++) {str += "" + i + "/"
');

}

html5里百度搜索框怎么做,基于jquery的仿百度搜索框效果代码

else {

for (var i = 1; i <= data.length; i++) {

str += "

" + i + "/" + data.length + " " + data[i - 1] + "";

}

$('#autoSearchItem ul').html(str);

}

$('li').each(function() {

$(this).bind('click', function() {

obj.val($(this).find('font').text());

$('#autoSearchItem').css('visibility', 'hidden');

});

});

$('li').each(function() {

$(this).hover(

function() {

$('li:nth-child(' + itemIndex + ')').css({ 'background': 'white', 'color': 'black' });

itemIndex = $('li').index($(this)[0]) + 1;

$(this).css({ 'background': 'blue', 'color': 'white' });

obj.val($('li:nth-child(' + itemIndex + ')').find('font').text());

},

function() {

$(this).css({ 'background': 'white', 'color': 'black' });

}

);

});

};

})(jQuery);

getdata.ashx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

namespace table

{

///

/// $codebehindclassname$ 的摘要说明

///

[WebService(Namespace = "http://tempuri.org/")]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

public class getdata: IHttpHandler

{

public void ProcessRequest(HttpContext context)

{

context.Response.Clear();

string value = GetResult();

context.Response.Write(value);

context.Response.End();

}

private string GetResult()

{

string result = string.Empty;

result = @"

[{""id"":""1"",""Code"":""1374123""},

{""id"":""2"",""Code"":""1374133""},

{""id"":""3"",""Code"":""1374143""},

{""id"":""4"",""Code"":""1374153""},

{""id"":""5"",""Code"":""1374163""},

{""id"":""6"",""Code"":""1374173""},

{""id"":""7"",""Code"":""1374183""},

{""id"":""8"",""Code"":""1374193""},

{""id"":""9"",""Code"":""1374213""},

{""id"":""10"",""Code"":""1374223""},

{""id"":""11"",""Code"":""1374233""},

{""id"":""12"",""Code"":""1374243""},

{""id"":""13"",""Code"":""1374253""},

{""id"":""14"",""Code"":""1374263""},

{""id"":""15"",""Code"":""1374273""},

{""id"":""16"",""Code"":""1374283""},

{""id"":""17"",""Code"":""1374293""},

{""id"":""18"",""Code"":""1374313""},

{""id"":""19"",""Code"":""1374323""},

{""id"":""20"",""Code"":""1374333""},

{""id"":""21"",""Code"":""1374343""},

{""id"":""22"",""Code"":""1374353""},

{""id"":""23"",""Code"":""1374363""},

{""id"":""24"",""Code"":""1374373""},

{""id"":""25"",""Code"":""1374383""},

{""id"":""26"",""Code"":""1374393""},

{""id"":""27"",""Code"":""1374403""},

{""id"":""28"",""Code"":""1374413""},

{""id"":""29"",""Code"":""1374423""},

{""id"":""30"",""Code"":""1374433""},

{""id"":""31"",""Code"":""1374443""},

{""id"":""32"",""Code"":""1374453""},

{""id"":""33"",""Code"":""1374463""},

{""id"":""34"",""Code"":""1374473""},

{""id"":""35"",""Code"":""1374483""},

{""id"":""36"",""Code"":""1374493""}]";

return result;

}

public bool IsReusable

{

get

{

return false;

}

}

}

}

本文地址:http://sicmodule.glev.cn/news/10127.html    歌乐夫 http://sicmodule.glev.cn/ , 查看更多
 
 
更多>同类行业资讯
0相关评论

新闻列表
企业新闻
推荐企业新闻
推荐图文
推荐行业资讯
点击排行
网站首页  |  关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2023001713号