<form action="http://www.baidu.com/baidu" target="_blank"> <table><tr><td> <input name=tn type=hidden value=baidu> <input type=text name=word size=80> <input " /> 日本不良网站在线观看 ,欧美日韩国产高清一区二区,日韩国产伦理

色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

ASP.NET 調用百度搜索引擎的代碼

百度搜索引擎提供了一段嵌入到頁面中的代碼

<form action="http://www.baidu.com/baidu" target="_blank">
<table><tr><td>
<input name=tn type=hidden value=baidu>
<input type=text name=word size=80>
<input type=hidden name=ie value="UTF-8">
<input type="submit" style="background:url(images/searchicon.gif) no-repeat; border:0; width:76px; height:26px; cursor:pointer" value="搜索">
</td></tr></table>
</form>


但在使用中由于我的頁面時UTF-8的

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


所以我必須在百度給出的代碼中加上這句

<input type=hidden name=ie value="UTF-8">


這個是第一部分,第二部分,我需要配置搜索條下的熱門詞匯,點擊后直接進入搜索結果,代碼如下

HtmlTableCell searchText = new HtmlTableCell();
searchText.InnerHtml = string.Format("<a href=/"http://www.baidu.com/baidu?tn=baidu&word={0}&ie=UTF-8/" target=/"_blank/">{0}</a>|", dt.Rows[i]["SearchText"].ToString());

tr_search.Cells.Add(searchText);

AspNet技術ASP.NET 調用百度搜索引擎的代碼,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 赤峰市| 绥阳县| 阿瓦提县| 嘉善县| 岳池县| 苗栗县| 屯留县| 三穗县| 时尚| 商洛市| 洛南县| 叙永县| 永春县| 台南市| 浙江省| 澄城县| 闵行区| 兴安县| 淳安县| 明光市| 北流市| 简阳市| 吴旗县| 上思县| 县级市| 余江县| 喜德县| 阿城市| 绍兴县| 怀柔区| 朝阳区| 揭东县| 章丘市| 嘉义县| 崇州市| 蒙阴县| 府谷县| 英超| 临夏市| 淄博市| 安陆市|