zoukankan      html  css  js  c++  java
  • 各大搜索引擎之搜索框代码

          关于各大网站的搜索引擎搜索框代码,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>

  • 相关阅读:
    usaco-4.1-nuggets-passed
    usaco-3.4-rockers-passed
    usaco-3.4-fence9-passed
    usaco-3.4-heritage-passed
    usaco-3.3-game1-passed
    usaco-3.3-range-passed
    usaco-3.3-camelot-passed
    6.23课堂作业
    初识JVM虚拟机
    JDK安装以及配置环境变量的步骤
  • 原文地址:https://www.cnblogs.com/Arison/p/4382547.html
Copyright © 2011-2022 走看看