百度
360搜索
搜狗搜索

Google和百度、雅虎的站内搜索代码详细介绍

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

对于一个来说,使用搜索引擎来进行站内搜索往往比自己编写的站内搜索更高效,并且不占用网站的资源,下面是我搜集到的几个主要搜索引擎(Google和百度、雅虎)的站内搜索代码,使用时只需要将代码里的"www.jb51.net"替换成你的网址即可。

<!--Google站内搜索开始-->

<form method=get&nb
sp;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站内搜索开始--&
gt;

<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 ty
pe=text name="p">

<input type="submit" value="Yahoo 搜索">

<input type=hidden name=vs value="www.jb51.net">

</form>

<!--Yahoo站内搜索结束
MTXFdkl-->

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

<!--Google站内搜索开始-->

<script type="text/"> 

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站内搜索结束-->

本文标题: Google和百度、雅虎的站内搜索代码 ,

网站数据信息

"Google和百度、雅虎的站内搜索代码"浏览人数已经达到46次,如你需要查询该站的相关权重信息,可以点击进入"Chinaz数据" 查询。更多网站价值评估因素如:Google和百度、雅虎的站内搜索代码的访问速度、搜索引擎收录以及索引量、用户体验等。 要评估一个站的价值,最主要还是需要根据您自身的需求,如网站IP、PV、跳出率等!