天天看點

免費站内搜尋代碼

http://hi.baidu.com/juyow/blog/item/5d31c5eab1839ad3d539c9b6.html

http://www.xfly.com.cn/Article/Dev/Programme/csharp/200512/Article_3721.html

百度baidu搜尋站内免費搜尋代碼:

--------------------------------------------------------------------------------

·百度向網友開放免費下載下傳百度搜尋代碼。

·隻需将以下代碼之一加入到您的網頁中,您的網站即可獲得百度搜尋引擎一樣強大的搜尋功能!

使用本段代碼時,您隻需要用您的網站位址替換代碼中"www.example.com"即可實作站内搜尋功能。

HTML代碼: 

<SCRIPT language=javascript>

function g(formname) {

var url = "http://www.baidu.com/baidu";

if (formname.s[1].checked) {

formname.ct.value = "2097152";

}

else {

formname.ct.value = "0";

formname.action = url;

return true;

</SCRIPT>

<form name="f1" onsubmit="return g(this)">

<table bgcolor="#FFFFFF" style="font-size:9pt;">

<tr height="60"><td valign="top"><img src="http://img.baidu.com/img/logo-137px.gif" border="0" alt="baidu"></td>

<td>

<input name=word size="30" maxlength="100">

<input type="submit" value="百度搜尋"><br>

<input name=tn type=hidden value="bds">

<input name=cl type=hidden value="3">

<input name=ct type=hidden>

<input name=si type=hidden value="www.example.com">

<input name=s type=radio> 網際網路

<input name=s type=radio checked> www.example.com

</td></tr></table>

</form>

Google 免費:讓使用者搜尋您的網站

您的網頁也想擁有 Google 搜尋嗎,您希望讓使用者搜尋您網站上的内容嗎?您隻須将下面代碼片斷添加在您的網站上,并且将 “YOUR DOMAIN” 換成您自己的域名,比如 http://news.google.com,就可以實作站内搜尋。

您可以根據個人品味對其進行修改,如取消居中,調整其寬度,或改變背景顔色,等等。(但請注意,Google 徽标的背景是白色,而不是透明。)如果您喜歡具有其它背景顔色或大小的 Google 徽标,這裡有不同的徽标貼圖可供選用。您可以将其中任何徽标替換到以下搜尋代碼中。

注意:如果您的網站編碼不是 GB2312,您需要将代碼中的兩個 GB2312 換成您網站的編碼,比如 Big5。

<!-- SiteSearch Google -->

<form method=get action="http://www.google.com/search">

<table bgcolor="#FFFFFF"><tr><td>

<a href="http://www.google.com/">

<img src="http://www.google.com/logos/Logo_40wht.gif" 

border="0" alt="Google"></a>

</td>

<input type=text name=q size=31 maxlength=255 value="">

<input type=hidden name=ie value=GB2312>

<input type=hidden name=oe value=GB2312>

<input type=hidden name=hl value=zh-CN>

<input type=submit name=btnG value="Google 搜尋">

<font size=-1>

<input type=hidden name=domains value="YOUR DOMAIN NAME"><br>

<input type=radio name=sitesearch value=""> 搜尋WWW 

<input type=radio name=sitesearch value="YOUR DOMAIN NAME" checked> 搜尋YOUR DOMAIN NAME

</font>

<!-- SiteSearch Google --> 

雅虎yahoo搜尋站内免費搜尋代碼:

将以下HTML代碼放入您的網頁中即可進行站内檢索(需将www.example.com換成您網站的域名)

<!--Begin of Y!Search --><form method="get" action="http://www.yahoo.com.cn/search"><a href="http://www.yahoo.com.cn" target="_blank"><img src="http://cn.yimg.com/search/yisou/aliya/pagerlogo.gif" width="50" height="30" border="0"/></a><input type="text" name="p" size="30" maxlength="50"><input type="submit" value="在 www.example.com 站内搜尋" name="submit"><input type="hidden" name="vs" value="www.example.com"><input type="hidden" name="source" value="site_search"></form><!--End of Y!Search -->

騰訊搜搜SOSO站内免費搜尋代碼:

<!--Begin of Search QQ --><form method="get" action="http://www.soso.com/q" target=_blank><a href="http://www.soso.com" target="_blank"><img src="http://wcache.soso.com/www/images/public/soso_logo.gif" border="0" align="absbottom"></a><input type="text" name="w" size="30" maxlength="50"><input type="hidden" name="sc" value="site"><input type="submit" value="在 www.example.com 站内搜尋"><input type="hidden" name="site" value="www.example.com"><input type="hidden" name="ch" value="website"></form><!--End of Search QQ -->

MSN 搜尋站内免費搜尋代碼:

若要使通路者可以搜尋站點上的内容,請向網頁中添加以下代碼:

<!-- Site search from MSN --><form method="get" action="http://search.msn.com.cn/results.aspx"> <input type="hidden" name="cp" value="CODE PAGE USED BY YOUR HTML PAGE"/> <input type="hidden" name="FORM" value="FREESS"/><table bgcolor="#FFFFFF"><tr><td><a href="http://search.msn.com.cn/"><img src="http://search.msn.com.cn/s/affillogo.gif" border="0" ALT="MSN 搜尋"/></a></td><td>

<input type="text" name="q" size="30" /><input type="submit" value="Search Site"/> <input type="hidden" name="q1" value="site:YOUR DOMAIN NAME GOES HERE"/> </td></tr></table></form><!-- Site Search from MSN -->

重要提示! 以下代碼中,需要用 3 位或 4 位代碼頁數字替換“您的 HTML 頁使用的代碼頁”,此代碼頁用來顯示網站語言。 

例如,如果您的網站是簡體中文,應該用數字 936 替換此說明文字。代碼如下: 

value="936"

所有語言的代碼頁值,請看 Windows 支援的代碼頁。

TOM 搜尋站内免費搜尋代碼:

使用本段代碼時,您隻需要用您的網站位址替換代碼中"www.example.com"即可實作站内搜尋功能

JS代碼:

<script language="JavaScript" src="http://ad.tom.com/search/style03.js"></script>

HTML代碼:

<!--

function go(formname)

{

var url = "http://search.tom.com/search.php?";

formname.method = "get";

if (formname.myselectvalue.value == "1") {

document.search_form1.word.value = document.search_form1.word.value+" site:www.example.com";

//-->

<form name="search_form1" target="_blank" onsubmit="return go(this)">

<input name=word size="30" value="請輸入要查找的關鍵字" onMouseOver="this.focus()" onBlur="if (value ==''){value='請輸入要查找的關鍵字'}" onFocus="this.select()" onClick="if(this.value=='請輸入要查找的關鍵字')this.value=''">

<input type="submit" value="TOM搜尋"><br>

<INPUT name=myselectvalue type=hidden value=0>

<INPUT CHECKED name=myselect onclick=javascript:this.form.myselectvalue.value=0; type=radio value=0>

<FONT color=#0000cc style="FONT-SIZE: 12px">網際網路</FONT> 

<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=1; type=radio value=1>

<FONT color=#ff0000 style="FONT-SIZE: 12px">www.example.com</FONT> 

繼續閱讀