Google和百度、雅虎的站内搜索代码
来源:互联网 发布:ubuntu 查看所有硬盘 编辑:程序博客网 时间:2024/06/11 10:28
对于一个网站来说,使用搜索引擎来进行站内搜索往往比自己编写的站内搜索更高效,并且不占用网站服务器的资源,下面是我搜集到的几个主要搜索引擎(Google和百度、雅虎)的站内搜索代码,使用时只需要将代码里的"www.yishang.info"替换成你的网址即可。
<!--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.yishang.info">
<input type=hidden name=sitesearch value="www.yishang.info">
</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.yishang.info">
</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.yishang.info">
</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.yishang.info&sitesearch=www.yishang.info&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.yishang.info&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站内搜索开始-->
<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.yishang.info">
<input type=hidden name=sitesearch value="www.yishang.info">
</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.yishang.info">
</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.yishang.info">
</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.yishang.info&sitesearch=www.yishang.info&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.yishang.info&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和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- Google和百度、雅虎的站内搜索代码
- 主要搜索引擎(Google和百度、雅虎)的站内搜索代码
- 调用Google和百度、雅虎进行站内搜索代码
- 几个主要搜索引擎(Google和百度、雅虎)的站内搜索代码
- 百度 和 谷歌 的站内搜索引擎代码
- Google和Baidu的站内搜索代码
- 用百度实现站内搜索的Javascript代码
- jqGrid 3.6.2 中文文档——BasicGrid(3) .
- 用红色显示ASP查询数据时得到的记录关键词
- 苹果在研制ARM处理器笔记本
- 一些常用的ASP自定义函数全集
- 云计算之存储即服务 - 网络接入存储(NAS)
- Google和百度、雅虎的站内搜索代码
- Android学习笔记技巧之垂直和水平滚动视图
- 设计模式六大原则(1):单一职责原则
- Spring对字段和集合的注入---依赖注入
- 个性化vim之配置文件vimrc
- [JavaScript][jQuery]jQuery操作Table
- extern与static的区别于用法
- 有关ewebeditor编辑器在修改文章时内容...
- typedef用法小结