首页 » 技术文章 » 谷歌、百度站内搜索代码

谷歌、百度站内搜索代码

时间: 2011-08-12 阅读: 18,605 次 评论: 1 条

谷歌、百度站内搜索代码 例子如下
上面是谷歌、百度站内搜索代码的演示, 下面是谷歌、百度站内搜索代码的代码

















  

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









<!--Google站内搜索开始-->
<form method=get action="http://www.google.com/search">
<input type=text name=q>
<input type=submit name=btnG 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=hidden name=domains value="www.runker.net">
<input type=hidden name=sitesearch value="www.runker.net">
</form>
<!--Google站内搜索结束-->

<!--Baidu站内搜索开始-->
<form action="http://www.baidu.com/baidu">
<input type=text name=word>
<input type="submit" value="百度搜索">
<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.runker.net">
</form>
<!--Baidu站内搜索结束-->

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

  </p>
<p>下面是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.runker.net&sitesearch=www.runker.net&q="+wq;
window.open(link); }
</script>
<input type="text" name="wq"/>
<input type="submit" onclick="javascript:googlesearch()" value="谷歌搜索" />
<!--Google站内搜索结束-->

<!--Baidu站内搜索开始-->
<script language="javascript">
function baidusearch () {
var wd=document.getElementsByName("wd")[0].value;
var link="http://www.baidu.com/s?si=www.runker.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站内搜索结束-->

</p>

作者:行客工作室         如文章内容侵权:请发邮件到 ifankui@foxmail.com 反馈
简介:本网站成立于2011年,分享各种优化软件、视频教程、电影电视剧下载。
宗旨:一个兴趣爱好而做的博客网站,所以分享的各种软件、电影绝对没有病毒。


  • 关于PS的字体设置问题(锐利、犀利、浑厚、平滑的正确选择)

  • 2017年4月迅雷新推出的活动:免费领取一年VIP迅雷白金会员

  • hongmi

    红米手机刷机教程(详细图解)

  • Mac没有允许任何来源选项的解决办法

  • 主板跳线的连接方式

  • 谷歌打不开的解决办法

  • ie10

    Win7版IE10浏览器微软官方发布下载

  • 不跳转google.com.hk 直接访问google.com的方法

  • 微软新logo

    Win8系统net framework 3.5运行库不能安装的解决办法

  • 程序无法启动 使用命令行 sxstrace.exe

    程序无法启动 使用命令行 sxstrace.exe 工具的解决办法

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注




  1. Bobbie 2011-09-17 11:09 回复
    Internet Explorer 6.0 Internet Explorer 6.0 Windows XP Windows XP

    That's way the bestest awnser so far!