各大搜索引擎之搜索框代碼


 

      關於各大網站的搜索引擎搜索框代碼,Arison已親自嘗試,確實很強大耶。在此和大家分享下。新人呆ben。歡迎吐槽交流~~!!

 

百度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>
<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>
</td></tr></table>
</form>
<!-- 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站內免費搜索代碼:
--------------------------------------------------------------------------------
將以下HTML代碼放入您的網頁中即可進行站內檢索(需將www.example.com換成您網站的域名)
<!--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代碼:

<SCRIPT language=javascript>
<!--
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";
}
formname.action = url;
return true;
}
//-->
</SCRIPT>
<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> 
</form>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM