• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    Google和百度、雅虎的站内搜索代码
    对于一个网站来说,使用搜索引擎来进行站内搜索往往比自己编写的站内搜索更高效,并且不占用网站服务器的资源,下面是我搜集到的几个主要搜索引擎(Google和百度、雅虎)的站内搜索代码,使用时只需要将代码里的"www.jb51.net"替换成你的网址即可。

    <!--Google站内搜索开始-->
    <form method=get action="http://www.google.com/search">
    <input type=text name=q>
    <input type=submit name=btnG value="Google 搜索">
    <input type=hidden name=ie value=GB2312>
    <input type=hidden name=oe value=GB2312>
    <input type=hidden name=hl value=zh-CN>
    <input type=hidden name=domains value="www.jb51.net">
    <input type=hidden name=sitesearch value="www.jb51.net">
    </form>
    <!--Google站内搜索结束-->

    <!--Baidu站内搜索开始-->
    <form action="http://www.baidu.com/baidu">
    <input type=text name=word>
    <input type="submit" value="Baidu 搜索">
    <input name=tn type=hidden value="bds">
    <input name=cl type=hidden value="3">
    <input name=ct type=hidden value="2097152">
    <input name=si type=hidden value="www.jb51.net">
    </form>
    <!--Baidu站内搜索结束-->

    <!--Yahoo站内搜索开始-->
    <form action="http://www.yahoo.com.cn/search">
    <input type=text name="p">
    <input type="submit" value="Yahoo 搜索">
    <input type=hidden name=vs value="www.jb51.net">
    </form>
    <!--Yahoo站内搜索结束-->

    下面是Google和百度的Javascript版的站内搜索代码:

    <!--Google站内搜索开始-->
    <script type="text/javascript"> 
    function googlesearch () {
    var wq=document.getElementsByName("wq")[0].value;
    var link="http://www.google.com/search?domains=www.jb51.net&sitesearch=www.jb51.net&q="+wq;
    window.open(link); }
    </script>
    <input type="text" name="wq"/><input type="submit" onclick="javascript:googlesearch()" value="Google 搜索" />
    <!--Google站内搜索结束-->

    <!--Baidu站内搜索开始-->
    <script language="javascript">
    function baidusearch () {
    var wd=document.getElementsByName("wd")[0].value;
    var link="http://www.baidu.com/s?si=www.jb51.net&cl=3&ct=2097152&tn=baidulocal&word="+wd;
    window.open(link); }
    </script>
    <input type="text" name="wd"/><input type="submit" onclick="javascript:baidusearch()" value="Baidu 搜索" />
    <!--Baidu站内搜索结束-->
    上一篇:推荐一些SEO工具软件和站点,做站必备品
    下一篇:网站PR值的作用是不是被高估了
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯

    时间:9:00-21:00 (节假日不休)

    地址:江苏信息产业基地11号楼四层

    《增值电信业务经营许可证》 苏B2-20120278

    Google和百度、雅虎的站内搜索代码 Google,和,百度,雅虎,的,站内,